summaryrefslogtreecommitdiff
path: root/deps/v8/src/code-factory.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2017-10-18 15:03:02 -0700
committerMichaël Zasso <targos@protonmail.com>2017-10-18 17:01:41 -0700
commit3d1b3df9486c0e7708065257f7311902f6b7b366 (patch)
treecb051bdeaead11e06dcd97725783e0f113afb1bf /deps/v8/src/code-factory.cc
parente2cddbb8ccdb7b3c4a40c8acc630f68703bc77b5 (diff)
downloadnode-new-3d1b3df9486c0e7708065257f7311902f6b7b366.tar.gz
deps: update V8 to 6.2.414.32
PR-URL: https://github.com/nodejs/node/pull/15362 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/v8/src/code-factory.cc')
-rw-r--r--deps/v8/src/code-factory.cc113
1 files changed, 44 insertions, 69 deletions
diff --git a/deps/v8/src/code-factory.cc b/deps/v8/src/code-factory.cc
index ebeb540230..9f6207cd98 100644
--- a/deps/v8/src/code-factory.cc
+++ b/deps/v8/src/code-factory.cc
@@ -34,8 +34,8 @@ Callable CodeFactory::LoadICProtoArray(Isolate* isolate,
bool throw_if_nonexistent) {
return Callable(
throw_if_nonexistent
- ? isolate->builtins()->LoadICProtoArrayThrowIfNonexistent()
- : isolate->builtins()->LoadICProtoArray(),
+ ? BUILTIN_CODE(isolate, LoadICProtoArrayThrowIfNonexistent)
+ : BUILTIN_CODE(isolate, LoadICProtoArray),
LoadICProtoArrayDescriptor(isolate));
}
@@ -49,8 +49,8 @@ Callable CodeFactory::ApiGetter(Isolate* isolate) {
Callable CodeFactory::LoadGlobalIC(Isolate* isolate, TypeofMode typeof_mode) {
return Callable(
typeof_mode == NOT_INSIDE_TYPEOF
- ? isolate->builtins()->LoadGlobalICTrampoline()
- : isolate->builtins()->LoadGlobalICInsideTypeofTrampoline(),
+ ? BUILTIN_CODE(isolate, LoadGlobalICTrampoline)
+ : BUILTIN_CODE(isolate, LoadGlobalICInsideTypeofTrampoline),
LoadGlobalDescriptor(isolate));
}
@@ -58,37 +58,24 @@ Callable CodeFactory::LoadGlobalIC(Isolate* isolate, TypeofMode typeof_mode) {
Callable CodeFactory::LoadGlobalICInOptimizedCode(Isolate* isolate,
TypeofMode typeof_mode) {
return Callable(typeof_mode == NOT_INSIDE_TYPEOF
- ? isolate->builtins()->LoadGlobalIC()
- : isolate->builtins()->LoadGlobalICInsideTypeof(),
+ ? BUILTIN_CODE(isolate, LoadGlobalIC)
+ : BUILTIN_CODE(isolate, LoadGlobalICInsideTypeof),
LoadGlobalWithVectorDescriptor(isolate));
}
// static
-Callable CodeFactory::CallIC(Isolate* isolate, ConvertReceiverMode mode) {
- CallICStub stub(isolate, mode);
- return make_callable(stub);
-}
-
-// static
-Callable CodeFactory::CallICTrampoline(Isolate* isolate,
- ConvertReceiverMode mode) {
- CallICTrampolineStub stub(isolate, mode);
- return make_callable(stub);
-}
-
-// static
Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) {
return Callable(language_mode == STRICT
- ? isolate->builtins()->StoreICStrictTrampoline()
- : isolate->builtins()->StoreICTrampoline(),
+ ? BUILTIN_CODE(isolate, StoreICStrictTrampoline)
+ : BUILTIN_CODE(isolate, StoreICTrampoline),
StoreDescriptor(isolate));
}
// static
Callable CodeFactory::StoreICInOptimizedCode(Isolate* isolate,
LanguageMode language_mode) {
- return Callable(language_mode == STRICT ? isolate->builtins()->StoreICStrict()
- : isolate->builtins()->StoreIC(),
+ return Callable(language_mode == STRICT ? BUILTIN_CODE(isolate, StoreICStrict)
+ : BUILTIN_CODE(isolate, StoreIC),
StoreWithVectorDescriptor(isolate));
}
@@ -96,22 +83,22 @@ Callable CodeFactory::StoreICInOptimizedCode(Isolate* isolate,
Callable CodeFactory::StoreIC_Uninitialized(Isolate* isolate,
LanguageMode language_mode) {
return Callable(language_mode == STRICT
- ? isolate->builtins()->StoreICStrict_Uninitialized()
- : isolate->builtins()->StoreIC_Uninitialized(),
+ ? BUILTIN_CODE(isolate, StoreICStrict_Uninitialized)
+ : BUILTIN_CODE(isolate, StoreIC_Uninitialized),
StoreWithVectorDescriptor(isolate));
}
Callable CodeFactory::StoreOwnIC(Isolate* isolate) {
// TODO(ishell): Currently we use StoreOwnIC only for storing properties that
// already exist in the boilerplate therefore we can use StoreIC.
- return Callable(isolate->builtins()->StoreICStrictTrampoline(),
+ return Callable(BUILTIN_CODE(isolate, StoreICStrictTrampoline),
StoreDescriptor(isolate));
}
Callable CodeFactory::StoreOwnICInOptimizedCode(Isolate* isolate) {
// TODO(ishell): Currently we use StoreOwnIC only for storing properties that
// already exist in the boilerplate therefore we can use StoreIC.
- return Callable(isolate->builtins()->StoreICStrict(),
+ return Callable(BUILTIN_CODE(isolate, StoreICStrict),
StoreWithVectorDescriptor(isolate));
}
@@ -120,8 +107,8 @@ Callable CodeFactory::StoreGlobalIC(Isolate* isolate,
LanguageMode language_mode) {
// TODO(ishell): Use StoreGlobalIC[Strict]Trampoline when it's ready.
return Callable(language_mode == STRICT
- ? isolate->builtins()->StoreICStrictTrampoline()
- : isolate->builtins()->StoreICTrampoline(),
+ ? BUILTIN_CODE(isolate, StoreICStrictTrampoline)
+ : BUILTIN_CODE(isolate, StoreICTrampoline),
StoreDescriptor(isolate));
}
@@ -129,8 +116,8 @@ Callable CodeFactory::StoreGlobalIC(Isolate* isolate,
Callable CodeFactory::StoreGlobalICInOptimizedCode(Isolate* isolate,
LanguageMode language_mode) {
// TODO(ishell): Use StoreGlobalIC[Strict] when it's ready.
- return Callable(language_mode == STRICT ? isolate->builtins()->StoreICStrict()
- : isolate->builtins()->StoreIC(),
+ return Callable(language_mode == STRICT ? BUILTIN_CODE(isolate, StoreICStrict)
+ : BUILTIN_CODE(isolate, StoreIC),
StoreWithVectorDescriptor(isolate));
}
@@ -138,8 +125,8 @@ Callable CodeFactory::StoreGlobalICInOptimizedCode(Isolate* isolate,
Callable CodeFactory::KeyedStoreIC(Isolate* isolate,
LanguageMode language_mode) {
return Callable(language_mode == STRICT
- ? isolate->builtins()->KeyedStoreICStrictTrampoline()
- : isolate->builtins()->KeyedStoreICTrampoline(),
+ ? BUILTIN_CODE(isolate, KeyedStoreICStrictTrampoline)
+ : BUILTIN_CODE(isolate, KeyedStoreICTrampoline),
StoreDescriptor(isolate));
}
@@ -147,8 +134,8 @@ Callable CodeFactory::KeyedStoreIC(Isolate* isolate,
Callable CodeFactory::KeyedStoreICInOptimizedCode(Isolate* isolate,
LanguageMode language_mode) {
return Callable(language_mode == STRICT
- ? isolate->builtins()->KeyedStoreICStrict()
- : isolate->builtins()->KeyedStoreIC(),
+ ? BUILTIN_CODE(isolate, KeyedStoreICStrict)
+ : BUILTIN_CODE(isolate, KeyedStoreIC),
StoreWithVectorDescriptor(isolate));
}
@@ -156,18 +143,12 @@ Callable CodeFactory::KeyedStoreICInOptimizedCode(Isolate* isolate,
Callable CodeFactory::KeyedStoreIC_Megamorphic(Isolate* isolate,
LanguageMode language_mode) {
return Callable(language_mode == STRICT
- ? isolate->builtins()->KeyedStoreIC_Megamorphic_Strict()
- : isolate->builtins()->KeyedStoreIC_Megamorphic(),
+ ? BUILTIN_CODE(isolate, KeyedStoreIC_Megamorphic_Strict)
+ : BUILTIN_CODE(isolate, KeyedStoreIC_Megamorphic),
StoreWithVectorDescriptor(isolate));
}
// static
-Callable CodeFactory::CompareIC(Isolate* isolate, Token::Value op) {
- CompareICStub stub(isolate, op);
- return make_callable(stub);
-}
-
-// static
Callable CodeFactory::BinaryOperation(Isolate* isolate, Token::Value op) {
switch (op) {
case Token::SAR:
@@ -260,19 +241,19 @@ Callable CodeFactory::SubString(Isolate* isolate) {
// static
Callable CodeFactory::ResumeGenerator(Isolate* isolate) {
- return Callable(isolate->builtins()->ResumeGeneratorTrampoline(),
+ return Callable(BUILTIN_CODE(isolate, ResumeGeneratorTrampoline),
ResumeGeneratorDescriptor(isolate));
}
// static
Callable CodeFactory::FrameDropperTrampoline(Isolate* isolate) {
- return Callable(isolate->builtins()->FrameDropperTrampoline(),
+ return Callable(BUILTIN_CODE(isolate, FrameDropperTrampoline),
FrameDropperTrampolineDescriptor(isolate));
}
// static
Callable CodeFactory::HandleDebuggerStatement(Isolate* isolate) {
- return Callable(isolate->builtins()->HandleDebuggerStatement(),
+ return Callable(BUILTIN_CODE(isolate, HandleDebuggerStatement),
ContextOnlyDescriptor(isolate));
}
@@ -298,7 +279,7 @@ Callable CodeFactory::AllocateHeapNumber(Isolate* isolate) {
// static
Callable CodeFactory::ArgumentAdaptor(Isolate* isolate) {
- return Callable(isolate->builtins()->ArgumentsAdaptorTrampoline(),
+ return Callable(BUILTIN_CODE(isolate, ArgumentsAdaptorTrampoline),
ArgumentAdaptorDescriptor(isolate));
}
@@ -310,13 +291,13 @@ Callable CodeFactory::Call(Isolate* isolate, ConvertReceiverMode mode) {
// static
Callable CodeFactory::CallWithArrayLike(Isolate* isolate) {
- return Callable(isolate->builtins()->CallWithArrayLike(),
+ return Callable(BUILTIN_CODE(isolate, CallWithArrayLike),
CallWithArrayLikeDescriptor(isolate));
}
// static
Callable CodeFactory::CallWithSpread(Isolate* isolate) {
- return Callable(isolate->builtins()->CallWithSpread(),
+ return Callable(BUILTIN_CODE(isolate, CallWithSpread),
CallWithSpreadDescriptor(isolate));
}
@@ -328,55 +309,55 @@ Callable CodeFactory::CallFunction(Isolate* isolate, ConvertReceiverMode mode) {
// static
Callable CodeFactory::CallVarargs(Isolate* isolate) {
- return Callable(isolate->builtins()->CallVarargs(),
+ return Callable(BUILTIN_CODE(isolate, CallVarargs),
CallVarargsDescriptor(isolate));
}
// static
Callable CodeFactory::CallForwardVarargs(Isolate* isolate) {
- return Callable(isolate->builtins()->CallForwardVarargs(),
+ return Callable(BUILTIN_CODE(isolate, CallForwardVarargs),
CallForwardVarargsDescriptor(isolate));
}
// static
Callable CodeFactory::CallFunctionForwardVarargs(Isolate* isolate) {
- return Callable(isolate->builtins()->CallFunctionForwardVarargs(),
+ return Callable(BUILTIN_CODE(isolate, CallFunctionForwardVarargs),
CallForwardVarargsDescriptor(isolate));
}
// static
Callable CodeFactory::Construct(Isolate* isolate) {
- return Callable(isolate->builtins()->Construct(),
+ return Callable(BUILTIN_CODE(isolate, Construct),
ConstructTrampolineDescriptor(isolate));
}
// static
Callable CodeFactory::ConstructWithSpread(Isolate* isolate) {
- return Callable(isolate->builtins()->ConstructWithSpread(),
+ return Callable(BUILTIN_CODE(isolate, ConstructWithSpread),
ConstructWithSpreadDescriptor(isolate));
}
// static
Callable CodeFactory::ConstructFunction(Isolate* isolate) {
- return Callable(isolate->builtins()->ConstructFunction(),
+ return Callable(BUILTIN_CODE(isolate, ConstructFunction),
ConstructTrampolineDescriptor(isolate));
}
// static
Callable CodeFactory::ConstructVarargs(Isolate* isolate) {
- return Callable(isolate->builtins()->ConstructVarargs(),
+ return Callable(BUILTIN_CODE(isolate, ConstructVarargs),
ConstructVarargsDescriptor(isolate));
}
// static
Callable CodeFactory::ConstructForwardVarargs(Isolate* isolate) {
- return Callable(isolate->builtins()->ConstructForwardVarargs(),
+ return Callable(BUILTIN_CODE(isolate, ConstructForwardVarargs),
ConstructForwardVarargsDescriptor(isolate));
}
// static
Callable CodeFactory::ConstructFunctionForwardVarargs(Isolate* isolate) {
- return Callable(isolate->builtins()->ConstructFunctionForwardVarargs(),
+ return Callable(BUILTIN_CODE(isolate, ConstructFunctionForwardVarargs),
ConstructForwardVarargsDescriptor(isolate));
}
@@ -397,12 +378,6 @@ Callable CodeFactory::InterpreterPushArgsThenConstruct(
}
// static
-Callable CodeFactory::InterpreterPushArgsThenConstructArray(Isolate* isolate) {
- return Callable(isolate->builtins()->InterpreterPushArgsThenConstructArray(),
- InterpreterPushArgsThenConstructArrayDescriptor(isolate));
-}
-
-// static
Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) {
// Note: If we ever use fpregs in the interpreter then we will need to
// save fpregs too.
@@ -412,7 +387,7 @@ Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) {
// static
Callable CodeFactory::InterpreterOnStackReplacement(Isolate* isolate) {
- return Callable(isolate->builtins()->InterpreterOnStackReplacement(),
+ return Callable(BUILTIN_CODE(isolate, InterpreterOnStackReplacement),
ContextOnlyDescriptor(isolate));
}
@@ -424,23 +399,23 @@ Callable CodeFactory::ArrayConstructor(Isolate* isolate) {
// static
Callable CodeFactory::ArrayPop(Isolate* isolate) {
- return Callable(isolate->builtins()->ArrayPop(), BuiltinDescriptor(isolate));
+ return Callable(BUILTIN_CODE(isolate, ArrayPop), BuiltinDescriptor(isolate));
}
// static
Callable CodeFactory::ArrayShift(Isolate* isolate) {
- return Callable(isolate->builtins()->ArrayShift(),
+ return Callable(BUILTIN_CODE(isolate, ArrayShift),
BuiltinDescriptor(isolate));
}
// static
Callable CodeFactory::ArrayPush(Isolate* isolate) {
- return Callable(isolate->builtins()->ArrayPush(), BuiltinDescriptor(isolate));
+ return Callable(BUILTIN_CODE(isolate, ArrayPush), BuiltinDescriptor(isolate));
}
// static
Callable CodeFactory::FunctionPrototypeBind(Isolate* isolate) {
- return Callable(isolate->builtins()->FunctionPrototypeBind(),
+ return Callable(BUILTIN_CODE(isolate, FunctionPrototypeBind),
BuiltinDescriptor(isolate));
}