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

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

Issue 71783003: Reland and fix "Add support for keyed-call on arrays of fast elements" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Test + fix Created 7 years, 1 month 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
« no previous file with comments | « src/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 1108
1103 1109
1104 void StubFailureTrampolineStub::GenerateAheadOfTime(Isolate* isolate) { 1110 void StubFailureTrampolineStub::GenerateAheadOfTime(Isolate* isolate) {
1105 StubFailureTrampolineStub stub1(NOT_JS_FUNCTION_STUB_MODE); 1111 StubFailureTrampolineStub stub1(NOT_JS_FUNCTION_STUB_MODE);
1106 StubFailureTrampolineStub stub2(JS_FUNCTION_STUB_MODE); 1112 StubFailureTrampolineStub stub2(JS_FUNCTION_STUB_MODE);
1107 stub1.GetCode(isolate)->set_is_pregenerated(true); 1113 stub1.GetCode(isolate)->set_is_pregenerated(true);
1108 stub2.GetCode(isolate)->set_is_pregenerated(true); 1114 stub2.GetCode(isolate)->set_is_pregenerated(true);
1109 } 1115 }
1110 1116
1111 1117
1118 void StubFailureTailCallTrampolineStub::GenerateAheadOfTime(Isolate* isolate) {
1119 StubFailureTailCallTrampolineStub stub;
1120 stub.GetCode(isolate)->set_is_pregenerated(true);
1121 }
1122
1123
1112 void ProfileEntryHookStub::EntryHookTrampoline(intptr_t function, 1124 void ProfileEntryHookStub::EntryHookTrampoline(intptr_t function,
1113 intptr_t stack_pointer, 1125 intptr_t stack_pointer,
1114 Isolate* isolate) { 1126 Isolate* isolate) {
1115 FunctionEntryHook entry_hook = isolate->function_entry_hook(); 1127 FunctionEntryHook entry_hook = isolate->function_entry_hook();
1116 ASSERT(entry_hook != NULL); 1128 ASSERT(entry_hook != NULL);
1117 entry_hook(function, stack_pointer); 1129 entry_hook(function, stack_pointer);
1118 } 1130 }
1119 1131
1120 1132
1121 static void InstallDescriptor(Isolate* isolate, HydrogenCodeStub* stub) { 1133 static void InstallDescriptor(Isolate* isolate, HydrogenCodeStub* stub) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 InstallDescriptor(isolate, &stub3); 1199 InstallDescriptor(isolate, &stub3);
1188 } 1200 }
1189 1201
1190 InternalArrayConstructorStub::InternalArrayConstructorStub( 1202 InternalArrayConstructorStub::InternalArrayConstructorStub(
1191 Isolate* isolate) { 1203 Isolate* isolate) {
1192 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 1204 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
1193 } 1205 }
1194 1206
1195 1207
1196 } } // namespace v8::internal 1208 } } // namespace v8::internal
OLDNEW
« 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