OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 /** | 5 /** |
6 * Implementation for v8-experimental.h. | 6 * Implementation for v8-experimental.h. |
7 */ | 7 */ |
8 | 8 |
9 #include "src/api-experimental.h" | 9 #include "src/api-experimental.h" |
10 | 10 |
11 #include "include/v8.h" | 11 #include "include/v8.h" |
12 #include "include/v8-experimental.h" | 12 #include "include/v8-experimental.h" |
13 #include "src/api.h" | 13 #include "src/api.h" |
14 #include "src/compiler/fast-accessor-assembler.h" | 14 #include "src/fast-accessor-assembler.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 | 18 v8::internal::FastAccessorAssembler* FromApi( |
19 v8::internal::compiler::FastAccessorAssembler* FromApi( | |
20 v8::experimental::FastAccessorBuilder* builder) { | 19 v8::experimental::FastAccessorBuilder* builder) { |
21 return reinterpret_cast<v8::internal::compiler::FastAccessorAssembler*>( | 20 return reinterpret_cast<v8::internal::FastAccessorAssembler*>(builder); |
22 builder); | |
23 } | 21 } |
24 | 22 |
25 | |
26 v8::experimental::FastAccessorBuilder* FromInternal( | 23 v8::experimental::FastAccessorBuilder* FromInternal( |
27 v8::internal::compiler::FastAccessorAssembler* fast_accessor_assembler) { | 24 v8::internal::FastAccessorAssembler* fast_accessor_assembler) { |
28 return reinterpret_cast<v8::experimental::FastAccessorBuilder*>( | 25 return reinterpret_cast<v8::experimental::FastAccessorBuilder*>( |
29 fast_accessor_assembler); | 26 fast_accessor_assembler); |
30 } | 27 } |
31 | 28 |
32 } // namespace | 29 } // namespace |
33 | 30 |
34 namespace v8 { | 31 namespace v8 { |
35 namespace internal { | 32 namespace internal { |
36 namespace experimental { | 33 namespace experimental { |
37 | 34 |
(...skipping 12 matching lines...) Expand all Loading... |
50 | 47 |
51 } // namespace experimental | 48 } // namespace experimental |
52 } // namespace internal | 49 } // namespace internal |
53 | 50 |
54 | 51 |
55 namespace experimental { | 52 namespace experimental { |
56 | 53 |
57 | 54 |
58 FastAccessorBuilder* FastAccessorBuilder::New(Isolate* isolate) { | 55 FastAccessorBuilder* FastAccessorBuilder::New(Isolate* isolate) { |
59 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); | 56 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
60 internal::compiler::FastAccessorAssembler* faa = | 57 internal::FastAccessorAssembler* faa = |
61 new internal::compiler::FastAccessorAssembler(i_isolate); | 58 new internal::FastAccessorAssembler(i_isolate); |
62 return FromInternal(faa); | 59 return FromInternal(faa); |
63 } | 60 } |
64 | 61 |
65 | 62 |
66 FastAccessorBuilder::ValueId FastAccessorBuilder::IntegerConstant( | 63 FastAccessorBuilder::ValueId FastAccessorBuilder::IntegerConstant( |
67 int const_value) { | 64 int const_value) { |
68 return FromApi(this)->IntegerConstant(const_value); | 65 return FromApi(this)->IntegerConstant(const_value); |
69 } | 66 } |
70 | 67 |
71 | 68 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 FromApi(this)->CheckNotZeroOrJump(value_id, label_id); | 119 FromApi(this)->CheckNotZeroOrJump(value_id, label_id); |
123 } | 120 } |
124 | 121 |
125 FastAccessorBuilder::ValueId FastAccessorBuilder::Call( | 122 FastAccessorBuilder::ValueId FastAccessorBuilder::Call( |
126 v8::FunctionCallback callback, ValueId value_id) { | 123 v8::FunctionCallback callback, ValueId value_id) { |
127 return FromApi(this)->Call(callback, value_id); | 124 return FromApi(this)->Call(callback, value_id); |
128 } | 125 } |
129 | 126 |
130 } // namespace experimental | 127 } // namespace experimental |
131 } // namespace v8 | 128 } // namespace v8 |
OLD | NEW |