OLD | NEW |
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 #include "src/code-stub-assembler.h" | 4 #include "src/code-stub-assembler.h" |
5 #include "src/code-factory.h" | 5 #include "src/code-factory.h" |
6 #include "src/frames-inl.h" | 6 #include "src/frames-inl.h" |
7 #include "src/frames.h" | 7 #include "src/frames.h" |
8 #include "src/ic/handler-configuration.h" | 8 #include "src/ic/handler-configuration.h" |
9 #include "src/ic/stub-cache.h" | 9 #include "src/ic/stub-cache.h" |
10 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 | 13 |
14 using compiler::Node; | 14 using compiler::Node; |
15 | 15 |
| 16 CodeStubAssembler::CodeStubAssembler(Isolate* isolate, Zone* zone, |
| 17 const CallInterfaceDescriptor& descriptor, |
| 18 Code::Flags flags, const char* name, |
| 19 size_t result_size) |
| 20 : compiler::CodeAssembler(isolate, zone, descriptor, flags, name, |
| 21 result_size) {} |
| 22 |
| 23 CodeStubAssembler::CodeStubAssembler(Isolate* isolate, Zone* zone, |
| 24 int parameter_count, Code::Flags flags, |
| 25 const char* name) |
| 26 : compiler::CodeAssembler(isolate, zone, parameter_count, flags, name) {} |
| 27 |
16 void CodeStubAssembler::Assert(ConditionBody codition_body, const char* message, | 28 void CodeStubAssembler::Assert(ConditionBody codition_body, const char* message, |
17 const char* file, int line) { | 29 const char* file, int line) { |
18 #if defined(DEBUG) | 30 #if defined(DEBUG) |
19 Label ok(this); | 31 Label ok(this); |
20 Label not_ok(this, Label::kDeferred); | 32 Label not_ok(this, Label::kDeferred); |
21 if (message != nullptr && FLAG_code_comments) { | 33 if (message != nullptr && FLAG_code_comments) { |
22 Comment("[ Assert: %s", message); | 34 Comment("[ Assert: %s", message); |
23 } else { | 35 } else { |
24 Comment("[ Assert"); | 36 Comment("[ Assert"); |
25 } | 37 } |
(...skipping 9188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9214 STATIC_ASSERT(FAST_HOLEY_ELEMENTS == (FAST_ELEMENTS | 1)); | 9226 STATIC_ASSERT(FAST_HOLEY_ELEMENTS == (FAST_ELEMENTS | 1)); |
9215 STATIC_ASSERT(FAST_HOLEY_DOUBLE_ELEMENTS == (FAST_DOUBLE_ELEMENTS | 1)); | 9227 STATIC_ASSERT(FAST_HOLEY_DOUBLE_ELEMENTS == (FAST_DOUBLE_ELEMENTS | 1)); |
9216 | 9228 |
9217 // Check prototype chain if receiver does not have packed elements. | 9229 // Check prototype chain if receiver does not have packed elements. |
9218 Node* holey_elements = Word32And(elements_kind, Int32Constant(1)); | 9230 Node* holey_elements = Word32And(elements_kind, Int32Constant(1)); |
9219 return Word32Equal(holey_elements, Int32Constant(1)); | 9231 return Word32Equal(holey_elements, Int32Constant(1)); |
9220 } | 9232 } |
9221 | 9233 |
9222 } // namespace internal | 9234 } // namespace internal |
9223 } // namespace v8 | 9235 } // namespace v8 |
OLD | NEW |