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

Side by Side Diff: src/frames.h

Issue 2803853005: Inline Array.prototype.forEach in TurboFan (Closed)
Patch Set: Review feedback Created 3 years, 7 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_FRAMES_H_ 5 #ifndef V8_FRAMES_H_
6 #define V8_FRAMES_H_ 6 #define V8_FRAMES_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/flags.h" 9 #include "src/flags.h"
10 #include "src/handles.h" 10 #include "src/handles.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 V(EXIT, ExitFrame) \ 104 V(EXIT, ExitFrame) \
105 V(JAVA_SCRIPT, JavaScriptFrame) \ 105 V(JAVA_SCRIPT, JavaScriptFrame) \
106 V(OPTIMIZED, OptimizedFrame) \ 106 V(OPTIMIZED, OptimizedFrame) \
107 V(WASM_COMPILED, WasmCompiledFrame) \ 107 V(WASM_COMPILED, WasmCompiledFrame) \
108 V(WASM_TO_JS, WasmToJsFrame) \ 108 V(WASM_TO_JS, WasmToJsFrame) \
109 V(JS_TO_WASM, JsToWasmFrame) \ 109 V(JS_TO_WASM, JsToWasmFrame) \
110 V(WASM_INTERPRETER_ENTRY, WasmInterpreterEntryFrame) \ 110 V(WASM_INTERPRETER_ENTRY, WasmInterpreterEntryFrame) \
111 V(INTERPRETED, InterpretedFrame) \ 111 V(INTERPRETED, InterpretedFrame) \
112 V(STUB, StubFrame) \ 112 V(STUB, StubFrame) \
113 V(STUB_FAILURE_TRAMPOLINE, StubFailureTrampolineFrame) \ 113 V(STUB_FAILURE_TRAMPOLINE, StubFailureTrampolineFrame) \
114 V(BUILTIN_CONTINUATION, BuiltinContinuationFrame) \
114 V(INTERNAL, InternalFrame) \ 115 V(INTERNAL, InternalFrame) \
115 V(CONSTRUCT, ConstructFrame) \ 116 V(CONSTRUCT, ConstructFrame) \
116 V(ARGUMENTS_ADAPTOR, ArgumentsAdaptorFrame) \ 117 V(ARGUMENTS_ADAPTOR, ArgumentsAdaptorFrame) \
117 V(BUILTIN, BuiltinFrame) \ 118 V(BUILTIN, BuiltinFrame) \
118 V(BUILTIN_EXIT, BuiltinExitFrame) 119 V(BUILTIN_EXIT, BuiltinExitFrame)
119 120
120 // Every pointer in a frame has a slot id. On 32-bit platforms, doubles consume 121 // Every pointer in a frame has a slot id. On 32-bit platforms, doubles consume
121 // two slots. 122 // two slots.
122 // 123 //
123 // Stack slot indices >= 0 access the callee stack with slot 0 corresponding to 124 // Stack slot indices >= 0 access the callee stack with slot 0 corresponding to
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 bool is_js_to_wasm() const { return type() == JS_TO_WASM; } 517 bool is_js_to_wasm() const { return type() == JS_TO_WASM; }
517 bool is_wasm_interpreter_entry() const { 518 bool is_wasm_interpreter_entry() const {
518 return type() == WASM_INTERPRETER_ENTRY; 519 return type() == WASM_INTERPRETER_ENTRY;
519 } 520 }
520 bool is_arguments_adaptor() const { return type() == ARGUMENTS_ADAPTOR; } 521 bool is_arguments_adaptor() const { return type() == ARGUMENTS_ADAPTOR; }
521 bool is_builtin() const { return type() == BUILTIN; } 522 bool is_builtin() const { return type() == BUILTIN; }
522 bool is_internal() const { return type() == INTERNAL; } 523 bool is_internal() const { return type() == INTERNAL; }
523 bool is_stub_failure_trampoline() const { 524 bool is_stub_failure_trampoline() const {
524 return type() == STUB_FAILURE_TRAMPOLINE; 525 return type() == STUB_FAILURE_TRAMPOLINE;
525 } 526 }
527 bool is_builtin_continuation() const {
528 return type() == BUILTIN_CONTINUATION;
529 }
526 bool is_construct() const { return type() == CONSTRUCT; } 530 bool is_construct() const { return type() == CONSTRUCT; }
527 bool is_builtin_exit() const { return type() == BUILTIN_EXIT; } 531 bool is_builtin_exit() const { return type() == BUILTIN_EXIT; }
528 virtual bool is_standard() const { return false; } 532 virtual bool is_standard() const { return false; }
529 533
530 bool is_java_script() const { 534 bool is_java_script() const {
531 Type type = this->type(); 535 Type type = this->type();
532 return (type == JAVA_SCRIPT) || (type == OPTIMIZED) || 536 return (type == JAVA_SCRIPT) || (type == OPTIMIZED) ||
533 (type == INTERPRETED) || (type == BUILTIN); 537 (type == INTERPRETED) || (type == BUILTIN);
534 } 538 }
535 bool is_wasm() const { 539 bool is_wasm() const {
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 return static_cast<ConstructFrame*>(frame); 1455 return static_cast<ConstructFrame*>(frame);
1452 } 1456 }
1453 1457
1454 protected: 1458 protected:
1455 inline explicit ConstructFrame(StackFrameIteratorBase* iterator); 1459 inline explicit ConstructFrame(StackFrameIteratorBase* iterator);
1456 1460
1457 private: 1461 private:
1458 friend class StackFrameIteratorBase; 1462 friend class StackFrameIteratorBase;
1459 }; 1463 };
1460 1464
1465 class BuiltinContinuationFrame : public InternalFrame {
1466 public:
1467 Type type() const override { return BUILTIN_CONTINUATION; }
1468
1469 static BuiltinContinuationFrame* cast(StackFrame* frame) {
1470 DCHECK(frame->is_builtin_continuation());
1471 return static_cast<BuiltinContinuationFrame*>(frame);
1472 }
1473
1474 protected:
1475 inline explicit BuiltinContinuationFrame(StackFrameIteratorBase* iterator);
1476
1477 private:
1478 friend class StackFrameIteratorBase;
1479 };
1461 1480
1462 class StackFrameIteratorBase BASE_EMBEDDED { 1481 class StackFrameIteratorBase BASE_EMBEDDED {
1463 public: 1482 public:
1464 Isolate* isolate() const { return isolate_; } 1483 Isolate* isolate() const { return isolate_; }
1465 1484
1466 bool done() const { return frame_ == NULL; } 1485 bool done() const { return frame_ == NULL; }
1467 1486
1468 protected: 1487 protected:
1469 // An iterator that iterates over a given thread's stack. 1488 // An iterator that iterates over a given thread's stack.
1470 StackFrameIteratorBase(Isolate* isolate, bool can_access_heap_objects); 1489 StackFrameIteratorBase(Isolate* isolate, bool can_access_heap_objects);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1603 1622
1604 1623
1605 // Reads all frames on the current stack and copies them into the current 1624 // Reads all frames on the current stack and copies them into the current
1606 // zone memory. 1625 // zone memory.
1607 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); 1626 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone);
1608 1627
1609 } // namespace internal 1628 } // namespace internal
1610 } // namespace v8 1629 } // namespace v8
1611 1630
1612 #endif // V8_FRAMES_H_ 1631 #endif // V8_FRAMES_H_
OLDNEW
« src/builtins/ia32/builtins-ia32.cc ('K') | « src/deoptimizer.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698