Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Unified Diff: src/code-stubs.cc

Issue 185653004: Experimental parser: merge to r19637 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 7e886757f81056d151f5ceece7a967deeef2a633..fe7d77eaa26f870d70f6a75c5f88ce055c894b76 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -43,7 +43,6 @@ CodeStubInterfaceDescriptor::CodeStubInterfaceDescriptor()
: register_param_count_(-1),
stack_parameter_count_(no_reg),
hint_stack_parameter_count_(-1),
- continuation_type_(NORMAL_CONTINUATION),
function_mode_(NOT_JS_FUNCTION_STUB_MODE),
register_params_(NULL),
deoptimization_handler_(NULL),
@@ -52,11 +51,6 @@ CodeStubInterfaceDescriptor::CodeStubInterfaceDescriptor()
has_miss_handler_(false) { }
-void CodeStub::GenerateStubsRequiringBuiltinsAheadOfTime(Isolate* isolate) {
- StubFailureTailCallTrampolineStub::GenerateAheadOfTime(isolate);
-}
-
-
bool CodeStub::FindCodeInCache(Code** code_out, Isolate* isolate) {
UnseededNumberDictionary* stubs = isolate->heap()->code_stubs();
int index = stubs->FindEntry(GetKey());
@@ -125,8 +119,7 @@ Handle<Code> PlatformCodeStub::GenerateCode(Isolate* isolate) {
GetCodeKind(),
GetICState(),
GetExtraICState(),
- GetStubType(),
- GetStubFlags());
+ GetStubType());
Handle<Code> new_object = factory->NewCode(
desc, flags, masm.CodeObject(), NeedsImmovableCode());
return new_object;
@@ -269,8 +262,8 @@ void BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(
}
-void NewStringAddStub::PrintBaseName(StringStream* stream) {
- stream->Add("NewStringAddStub");
+void StringAddStub::PrintBaseName(StringStream* stream) {
+ stream->Add("StringAddStub");
if ((flags() & STRING_ADD_CHECK_BOTH) == STRING_ADD_CHECK_BOTH) {
stream->Add("_CheckBoth");
} else if ((flags() & STRING_ADD_CHECK_LEFT) == STRING_ADD_CHECK_LEFT) {
@@ -476,37 +469,33 @@ void CompareNilICStub::State::Print(StringStream* stream) const {
}
-Handle<Type> CompareNilICStub::GetType(
- Isolate* isolate,
- Handle<Map> map) {
+Type* CompareNilICStub::GetType(Zone* zone, Handle<Map> map) {
if (state_.Contains(CompareNilICStub::GENERIC)) {
- return Type::Any(isolate);
+ return Type::Any(zone);
}
- Handle<Type> result = Type::None(isolate);
+ Type* result = Type::None(zone);
if (state_.Contains(CompareNilICStub::UNDEFINED)) {
- result = Type::Union(result, Type::Undefined(isolate), isolate);
+ result = Type::Union(result, Type::Undefined(zone), zone);
}
if (state_.Contains(CompareNilICStub::NULL_TYPE)) {
- result = Type::Union(result, Type::Null(isolate), isolate);
+ result = Type::Union(result, Type::Null(zone), zone);
}
if (state_.Contains(CompareNilICStub::MONOMORPHIC_MAP)) {
- Handle<Type> type = map.is_null()
- ? Type::Detectable(isolate) : Type::Class(map, isolate);
- result = Type::Union(result, type, isolate);
+ Type* type =
+ map.is_null() ? Type::Detectable(zone) : Type::Class(map, zone);
+ result = Type::Union(result, type, zone);
}
return result;
}
-Handle<Type> CompareNilICStub::GetInputType(
- Isolate* isolate,
- Handle<Map> map) {
- Handle<Type> output_type = GetType(isolate, map);
- Handle<Type> nil_type = nil_value_ == kNullValue
- ? Type::Null(isolate) : Type::Undefined(isolate);
- return Type::Union(output_type, nil_type, isolate);
+Type* CompareNilICStub::GetInputType(Zone* zone, Handle<Map> map) {
+ Type* output_type = GetType(zone, map);
+ Type* nil_type =
+ nil_value_ == kNullValue ? Type::Null(zone) : Type::Undefined(zone);
+ return Type::Union(output_type, nil_type, zone);
}
@@ -561,24 +550,12 @@ void KeyedStoreElementStub::Generate(MacroAssembler* masm) {
case FAST_HOLEY_SMI_ELEMENTS:
case FAST_DOUBLE_ELEMENTS:
case FAST_HOLEY_DOUBLE_ELEMENTS:
- case EXTERNAL_BYTE_ELEMENTS:
- case EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
- case EXTERNAL_SHORT_ELEMENTS:
- case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
- case EXTERNAL_INT_ELEMENTS:
- case EXTERNAL_UNSIGNED_INT_ELEMENTS:
- case EXTERNAL_FLOAT_ELEMENTS:
- case EXTERNAL_DOUBLE_ELEMENTS:
- case EXTERNAL_PIXEL_ELEMENTS:
- case UINT8_ELEMENTS:
- case INT8_ELEMENTS:
- case UINT16_ELEMENTS:
- case INT16_ELEMENTS:
- case UINT32_ELEMENTS:
- case INT32_ELEMENTS:
- case FLOAT32_ELEMENTS:
- case FLOAT64_ELEMENTS:
- case UINT8_CLAMPED_ELEMENTS:
+#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
+ case EXTERNAL_##TYPE##_ELEMENTS: \
+ case TYPE##_ELEMENTS:
+
+ TYPED_ARRAYS(TYPED_ARRAY_CASE)
+#undef TYPED_ARRAY_CASE
UNREACHABLE();
break;
case DICTIONARY_ELEMENTS:
@@ -723,12 +700,6 @@ void StubFailureTrampolineStub::GenerateAheadOfTime(Isolate* isolate) {
}
-void StubFailureTailCallTrampolineStub::GenerateAheadOfTime(Isolate* isolate) {
- StubFailureTailCallTrampolineStub stub;
- stub.GetCode(isolate);
-}
-
-
void ProfileEntryHookStub::EntryHookTrampoline(intptr_t function,
intptr_t stack_pointer,
Isolate* isolate) {
@@ -770,6 +741,20 @@ void FastNewClosureStub::InstallDescriptors(Isolate* isolate) {
}
+void FastNewContextStub::InstallDescriptors(Isolate* isolate) {
+ FastNewContextStub stub(FastNewContextStub::kMaximumSlots);
+ InstallDescriptor(isolate, &stub);
+}
+
+
+// static
+void FastCloneShallowArrayStub::InstallDescriptors(Isolate* isolate) {
+ FastCloneShallowArrayStub stub(FastCloneShallowArrayStub::CLONE_ELEMENTS,
+ DONT_TRACK_ALLOCATION_SITE, 0);
+ InstallDescriptor(isolate, &stub);
+}
+
+
// static
void BinaryOpICStub::InstallDescriptors(Isolate* isolate) {
BinaryOpICStub stub(Token::ADD, NO_OVERWRITE);
@@ -785,8 +770,15 @@ void BinaryOpWithAllocationSiteStub::InstallDescriptors(Isolate* isolate) {
// static
-void NewStringAddStub::InstallDescriptors(Isolate* isolate) {
- NewStringAddStub stub(STRING_ADD_CHECK_NONE, NOT_TENURED);
+void StringAddStub::InstallDescriptors(Isolate* isolate) {
+ StringAddStub stub(STRING_ADD_CHECK_NONE, NOT_TENURED);
+ InstallDescriptor(isolate, &stub);
+}
+
+
+// static
+void RegExpConstructResultStub::InstallDescriptors(Isolate* isolate) {
+ RegExpConstructResultStub stub;
InstallDescriptor(isolate, &stub);
}
« no previous file with comments | « src/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698