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-factory.cc

Issue 2684043002: [turbofan] Use fast stub for ForInPrepare and ForInNext (Closed)
Patch Set: add missing SmiUntag and remove ForInNext RT function Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 RegExpExecStub stub(isolate); 186 RegExpExecStub stub(isolate);
187 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); 187 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor());
188 } 188 }
189 189
190 // static 190 // static
191 Callable CodeFactory::StringFromCharCode(Isolate* isolate) { 191 Callable CodeFactory::StringFromCharCode(Isolate* isolate) {
192 Handle<Code> code(isolate->builtins()->StringFromCharCode()); 192 Handle<Code> code(isolate->builtins()->StringFromCharCode());
193 return Callable(code, BuiltinDescriptor(isolate)); 193 return Callable(code, BuiltinDescriptor(isolate));
194 } 194 }
195 195
196 #define DECLARE_TFS(Name, Kind, Extra, InterfaceDescriptor) \ 196 #define DECLARE_TFS(Name, Kind, Extra, InterfaceDescriptor, result_size) \
197 typedef InterfaceDescriptor##Descriptor Name##Descriptor; 197 typedef InterfaceDescriptor##Descriptor Name##Descriptor;
198 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, DECLARE_TFS, 198 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, DECLARE_TFS,
199 IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN) 199 IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
200 #undef DECLARE_TFS 200 #undef DECLARE_TFS
201 201
202 #define TFS_BUILTIN(Name) \ 202 #define TFS_BUILTIN(Name) \
203 Callable CodeFactory::Name(Isolate* isolate) { \ 203 Callable CodeFactory::Name(Isolate* isolate) { \
204 Handle<Code> code(isolate->builtins()->Name()); \ 204 Handle<Code> code(isolate->builtins()->Name()); \
205 return Callable(code, Name##Descriptor(isolate)); \ 205 return Callable(code, Name##Descriptor(isolate)); \
206 } 206 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 FastNewRestParameterDescriptor(isolate)); 357 FastNewRestParameterDescriptor(isolate));
358 } 358 }
359 359
360 // static 360 // static
361 Callable CodeFactory::FastNewStrictArguments(Isolate* isolate) { 361 Callable CodeFactory::FastNewStrictArguments(Isolate* isolate) {
362 return Callable(isolate->builtins()->FastNewStrictArguments(), 362 return Callable(isolate->builtins()->FastNewStrictArguments(),
363 FastNewRestParameterDescriptor(isolate)); 363 FastNewRestParameterDescriptor(isolate));
364 } 364 }
365 365
366 // static 366 // static
367 Callable CodeFactory::ForInPrepare(Isolate* isolate) {
368 return Callable(isolate->builtins()->ForInPrepare(),
369 ForInPrepareDescriptor(isolate));
370 }
371
372 // static
373 Callable CodeFactory::ForInNext(Isolate* isolate) {
374 return Callable(isolate->builtins()->ForInNext(),
375 ForInNextDescriptor(isolate));
376 }
377
378 // static
367 Callable CodeFactory::AllocateHeapNumber(Isolate* isolate) { 379 Callable CodeFactory::AllocateHeapNumber(Isolate* isolate) {
368 AllocateHeapNumberStub stub(isolate); 380 AllocateHeapNumberStub stub(isolate);
369 return make_callable(stub); 381 return make_callable(stub);
370 } 382 }
371 383
372 #define SIMD128_ALLOC(TYPE, Type, type, lane_count, lane_type) \ 384 #define SIMD128_ALLOC(TYPE, Type, type, lane_count, lane_type) \
373 Callable CodeFactory::Allocate##Type(Isolate* isolate) { \ 385 Callable CodeFactory::Allocate##Type(Isolate* isolate) { \
374 Allocate##Type##Stub stub(isolate); \ 386 Allocate##Type##Stub stub(isolate); \
375 return make_callable(stub); \ 387 return make_callable(stub); \
376 } 388 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 } 493 }
482 494
483 // static 495 // static
484 Callable CodeFactory::FunctionPrototypeBind(Isolate* isolate) { 496 Callable CodeFactory::FunctionPrototypeBind(Isolate* isolate) {
485 return Callable(isolate->builtins()->FunctionPrototypeBind(), 497 return Callable(isolate->builtins()->FunctionPrototypeBind(),
486 BuiltinDescriptor(isolate)); 498 BuiltinDescriptor(isolate));
487 } 499 }
488 500
489 } // namespace internal 501 } // namespace internal
490 } // namespace v8 502 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698