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

Side by Side Diff: src/code-stub-assembler.cc

Issue 1995543003: [turbofan] Add DebugBreak machine operator and support (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback Created 4 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
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/compiler/arm/code-generator-arm.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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-stub-assembler.h" 5 #include "src/code-stub-assembler.h"
6 #include "src/code-factory.h" 6 #include "src/code-factory.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 10
11 using compiler::Node; 11 using compiler::Node;
12 12
13 CodeStubAssembler::CodeStubAssembler(Isolate* isolate, Zone* zone, 13 CodeStubAssembler::CodeStubAssembler(Isolate* isolate, Zone* zone,
14 const CallInterfaceDescriptor& descriptor, 14 const CallInterfaceDescriptor& descriptor,
15 Code::Flags flags, const char* name, 15 Code::Flags flags, const char* name,
16 size_t result_size) 16 size_t result_size)
17 : compiler::CodeAssembler(isolate, zone, descriptor, flags, name, 17 : compiler::CodeAssembler(isolate, zone, descriptor, flags, name,
18 result_size) {} 18 result_size) {}
19 19
20 CodeStubAssembler::CodeStubAssembler(Isolate* isolate, Zone* zone, 20 CodeStubAssembler::CodeStubAssembler(Isolate* isolate, Zone* zone,
21 int parameter_count, Code::Flags flags, 21 int parameter_count, Code::Flags flags,
22 const char* name) 22 const char* name)
23 : compiler::CodeAssembler(isolate, zone, parameter_count, flags, name) {} 23 : compiler::CodeAssembler(isolate, zone, parameter_count, flags, name) {}
24 24
25 void CodeStubAssembler::Assert(Node* condition) {
26 #if defined(DEBUG)
27 Label ok(this);
28 Label not_ok(this);
29 Branch(condition, &ok, &not_ok);
30 Bind(&not_ok);
31 DebugBreak();
32 Goto(&ok);
33 Bind(&ok);
34 #endif
35 }
36
25 Node* CodeStubAssembler::BooleanMapConstant() { 37 Node* CodeStubAssembler::BooleanMapConstant() {
26 return HeapConstant(isolate()->factory()->boolean_map()); 38 return HeapConstant(isolate()->factory()->boolean_map());
27 } 39 }
28 40
29 Node* CodeStubAssembler::EmptyStringConstant() { 41 Node* CodeStubAssembler::EmptyStringConstant() {
30 return LoadRoot(Heap::kempty_stringRootIndex); 42 return LoadRoot(Heap::kempty_stringRootIndex);
31 } 43 }
32 44
33 Node* CodeStubAssembler::HeapNumberMapConstant() { 45 Node* CodeStubAssembler::HeapNumberMapConstant() {
34 return HeapConstant(isolate()->factory()->heap_number_map()); 46 return HeapConstant(isolate()->factory()->heap_number_map());
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1547 CallRuntime(Runtime::kOrdinaryHasInstance, context, callable, object)); 1559 CallRuntime(Runtime::kOrdinaryHasInstance, context, callable, object));
1548 } 1560 }
1549 Goto(&return_result); 1561 Goto(&return_result);
1550 1562
1551 Bind(&return_result); 1563 Bind(&return_result);
1552 return var_result.value(); 1564 return var_result.value();
1553 } 1565 }
1554 1566
1555 } // namespace internal 1567 } // namespace internal
1556 } // namespace v8 1568 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/compiler/arm/code-generator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698