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

Side by Side Diff: src/code-stubs.cc

Issue 110573004: Merge bleeding_edge 17696:18016. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 25 matching lines...) Expand all
36 #include "macro-assembler.h" 36 #include "macro-assembler.h"
37 37
38 namespace v8 { 38 namespace v8 {
39 namespace internal { 39 namespace internal {
40 40
41 41
42 CodeStubInterfaceDescriptor::CodeStubInterfaceDescriptor() 42 CodeStubInterfaceDescriptor::CodeStubInterfaceDescriptor()
43 : register_param_count_(-1), 43 : register_param_count_(-1),
44 stack_parameter_count_(no_reg), 44 stack_parameter_count_(no_reg),
45 hint_stack_parameter_count_(-1), 45 hint_stack_parameter_count_(-1),
46 continuation_type_(NORMAL_CONTINUATION),
46 function_mode_(NOT_JS_FUNCTION_STUB_MODE), 47 function_mode_(NOT_JS_FUNCTION_STUB_MODE),
47 register_params_(NULL), 48 register_params_(NULL),
48 deoptimization_handler_(NULL), 49 deoptimization_handler_(NULL),
49 handler_arguments_mode_(DONT_PASS_ARGUMENTS), 50 handler_arguments_mode_(DONT_PASS_ARGUMENTS),
50 miss_handler_(), 51 miss_handler_(),
51 has_miss_handler_(false) { } 52 has_miss_handler_(false) { }
52 53
53 54
55 void CodeStub::GenerateStubsRequiringBuiltinsAheadOfTime(Isolate* isolate) {
56 StubFailureTailCallTrampolineStub::GenerateAheadOfTime(isolate);
57 }
58
59
54 bool CodeStub::FindCodeInCache(Code** code_out, Isolate* isolate) { 60 bool CodeStub::FindCodeInCache(Code** code_out, Isolate* isolate) {
55 UnseededNumberDictionary* stubs = isolate->heap()->code_stubs(); 61 UnseededNumberDictionary* stubs = isolate->heap()->code_stubs();
56 int index = stubs->FindEntry(GetKey()); 62 int index = stubs->FindEntry(GetKey());
57 if (index != UnseededNumberDictionary::kNotFound) { 63 if (index != UnseededNumberDictionary::kNotFound) {
58 *code_out = Code::cast(stubs->ValueAt(index)); 64 *code_out = Code::cast(stubs->ValueAt(index));
59 return true; 65 return true;
60 } 66 }
61 return false; 67 return false;
62 } 68 }
63 69
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 State max_input = Max(left_state_, right_state_); 579 State max_input = Max(left_state_, right_state_);
574 580
575 if (!has_int_result() && op_ != Token::SHR && 581 if (!has_int_result() && op_ != Token::SHR &&
576 max_input <= NUMBER && max_input > result_state_) { 582 max_input <= NUMBER && max_input > result_state_) {
577 result_state_ = max_input; 583 result_state_ = max_input;
578 } 584 }
579 585
580 ASSERT(result_state_ <= (has_int_result() ? INT32 : NUMBER) || 586 ASSERT(result_state_ <= (has_int_result() ? INT32 : NUMBER) ||
581 op_ == Token::ADD); 587 op_ == Token::ADD);
582 588
589 // Reset overwrite mode unless we can actually make use of it, or may be able
590 // to make use of it at some point in the future.
591 if ((mode_ == OVERWRITE_LEFT && left_state_ > NUMBER) ||
592 (mode_ == OVERWRITE_RIGHT && right_state_ > NUMBER) ||
593 result_state_ > NUMBER) {
594 mode_ = NO_OVERWRITE;
595 }
596
583 if (old_state == GetExtraICState()) { 597 if (old_state == GetExtraICState()) {
584 // Tagged operations can lead to non-truncating HChanges 598 // Tagged operations can lead to non-truncating HChanges
585 if (left->IsUndefined() || left->IsBoolean()) { 599 if (left->IsUndefined() || left->IsBoolean()) {
586 left_state_ = GENERIC; 600 left_state_ = GENERIC;
587 } else if (right->IsUndefined() || right->IsBoolean()) { 601 } else if (right->IsUndefined() || right->IsBoolean()) {
588 right_state_ = GENERIC; 602 right_state_ = GENERIC;
589 } else { 603 } else {
590 // Since the fpu is to precise, we might bail out on numbers which 604 // Since the fpu is to precise, we might bail out on numbers which
591 // actually would truncate with 64 bit precision. 605 // actually would truncate with 64 bit precision.
592 ASSERT(!CpuFeatures::IsSupported(SSE2) && 606 ASSERT(!CpuFeatures::IsSupported(SSE2) &&
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 965
952 966
953 void JSEntryStub::FinishCode(Handle<Code> code) { 967 void JSEntryStub::FinishCode(Handle<Code> code) {
954 Handle<FixedArray> handler_table = 968 Handle<FixedArray> handler_table =
955 code->GetIsolate()->factory()->NewFixedArray(1, TENURED); 969 code->GetIsolate()->factory()->NewFixedArray(1, TENURED);
956 handler_table->set(0, Smi::FromInt(handler_offset_)); 970 handler_table->set(0, Smi::FromInt(handler_offset_));
957 code->set_handler_table(*handler_table); 971 code->set_handler_table(*handler_table);
958 } 972 }
959 973
960 974
961 void KeyedLoadDictionaryElementStub::Generate(MacroAssembler* masm) { 975 void KeyedLoadDictionaryElementPlatformStub::Generate(
976 MacroAssembler* masm) {
962 KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm); 977 KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm);
963 } 978 }
964 979
965 980
966 void CreateAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) { 981 void CreateAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {
967 CreateAllocationSiteStub stub; 982 CreateAllocationSiteStub stub;
968 stub.GetCode(isolate)->set_is_pregenerated(true); 983 stub.GetCode(isolate)->set_is_pregenerated(true);
969 } 984 }
970 985
971 986
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 1117
1103 1118
1104 void StubFailureTrampolineStub::GenerateAheadOfTime(Isolate* isolate) { 1119 void StubFailureTrampolineStub::GenerateAheadOfTime(Isolate* isolate) {
1105 StubFailureTrampolineStub stub1(NOT_JS_FUNCTION_STUB_MODE); 1120 StubFailureTrampolineStub stub1(NOT_JS_FUNCTION_STUB_MODE);
1106 StubFailureTrampolineStub stub2(JS_FUNCTION_STUB_MODE); 1121 StubFailureTrampolineStub stub2(JS_FUNCTION_STUB_MODE);
1107 stub1.GetCode(isolate)->set_is_pregenerated(true); 1122 stub1.GetCode(isolate)->set_is_pregenerated(true);
1108 stub2.GetCode(isolate)->set_is_pregenerated(true); 1123 stub2.GetCode(isolate)->set_is_pregenerated(true);
1109 } 1124 }
1110 1125
1111 1126
1127 void StubFailureTailCallTrampolineStub::GenerateAheadOfTime(Isolate* isolate) {
1128 StubFailureTailCallTrampolineStub stub;
1129 stub.GetCode(isolate)->set_is_pregenerated(true);
1130 }
1131
1132
1112 void ProfileEntryHookStub::EntryHookTrampoline(intptr_t function, 1133 void ProfileEntryHookStub::EntryHookTrampoline(intptr_t function,
1113 intptr_t stack_pointer, 1134 intptr_t stack_pointer,
1114 Isolate* isolate) { 1135 Isolate* isolate) {
1115 FunctionEntryHook entry_hook = isolate->function_entry_hook(); 1136 FunctionEntryHook entry_hook = isolate->function_entry_hook();
1116 ASSERT(entry_hook != NULL); 1137 ASSERT(entry_hook != NULL);
1117 entry_hook(function, stack_pointer); 1138 entry_hook(function, stack_pointer);
1118 } 1139 }
1119 1140
1120 1141
1121 static void InstallDescriptor(Isolate* isolate, HydrogenCodeStub* stub) { 1142 static void InstallDescriptor(Isolate* isolate, HydrogenCodeStub* stub) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 InstallDescriptor(isolate, &stub3); 1208 InstallDescriptor(isolate, &stub3);
1188 } 1209 }
1189 1210
1190 InternalArrayConstructorStub::InternalArrayConstructorStub( 1211 InternalArrayConstructorStub::InternalArrayConstructorStub(
1191 Isolate* isolate) { 1212 Isolate* isolate) {
1192 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 1213 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
1193 } 1214 }
1194 1215
1195 1216
1196 } } // namespace v8::internal 1217 } } // namespace v8::internal
OLDNEW
« include/v8-platform.h ('K') | « 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