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 | |
28 void CodeStubAssembler::Assert(ConditionBody codition_body, const char* message, | 16 void CodeStubAssembler::Assert(ConditionBody codition_body, const char* message, |
29 const char* file, int line) { | 17 const char* file, int line) { |
30 #if defined(DEBUG) | 18 #if defined(DEBUG) |
31 Label ok(this); | 19 Label ok(this); |
32 Label not_ok(this, Label::kDeferred); | 20 Label not_ok(this, Label::kDeferred); |
33 if (message != nullptr && FLAG_code_comments) { | 21 if (message != nullptr && FLAG_code_comments) { |
34 Comment("[ Assert: %s", message); | 22 Comment("[ Assert: %s", message); |
35 } else { | 23 } else { |
36 Comment("[ Assert"); | 24 Comment("[ Assert"); |
37 } | 25 } |
(...skipping 9188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9226 STATIC_ASSERT(FAST_HOLEY_ELEMENTS == (FAST_ELEMENTS | 1)); | 9214 STATIC_ASSERT(FAST_HOLEY_ELEMENTS == (FAST_ELEMENTS | 1)); |
9227 STATIC_ASSERT(FAST_HOLEY_DOUBLE_ELEMENTS == (FAST_DOUBLE_ELEMENTS | 1)); | 9215 STATIC_ASSERT(FAST_HOLEY_DOUBLE_ELEMENTS == (FAST_DOUBLE_ELEMENTS | 1)); |
9228 | 9216 |
9229 // Check prototype chain if receiver does not have packed elements. | 9217 // Check prototype chain if receiver does not have packed elements. |
9230 Node* holey_elements = Word32And(elements_kind, Int32Constant(1)); | 9218 Node* holey_elements = Word32And(elements_kind, Int32Constant(1)); |
9231 return Word32Equal(holey_elements, Int32Constant(1)); | 9219 return Word32Equal(holey_elements, Int32Constant(1)); |
9232 } | 9220 } |
9233 | 9221 |
9234 } // namespace internal | 9222 } // namespace internal |
9235 } // namespace v8 | 9223 } // namespace v8 |
OLD | NEW |