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 | 4 |
5 #include "src/builtins/builtins.h" | 5 #include "src/builtins/builtins.h" |
6 #include "src/builtins/builtins-utils.h" | 6 #include "src/builtins/builtins-utils.h" |
7 | 7 |
8 #include "src/string-builder.h" | 8 #include "src/string-builder.h" |
9 #include "src/wasm/wasm-module.h" | 9 #include "src/wasm/wasm-module.h" |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 Object::TypeOf(isolate, receiver), | 56 Object::TypeOf(isolate, receiver), |
57 Object::TypeOf(isolate, fun))); | 57 Object::TypeOf(isolate, fun))); |
58 } | 58 } |
59 | 59 |
60 if (is_wasm_object) { | 60 if (is_wasm_object) { |
61 DCHECK(!fun->IsJSFunction()); | 61 DCHECK(!fun->IsJSFunction()); |
62 SET_CALLSITE_PROPERTY(obj, call_site_wasm_obj_symbol, receiver); | 62 SET_CALLSITE_PROPERTY(obj, call_site_wasm_obj_symbol, receiver); |
63 | 63 |
64 Handle<Object> fun_index; | 64 Handle<Object> fun_index; |
65 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, fun_index, | 65 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, fun_index, |
66 Object::ToUint32(isolate, fun)); | 66 Object::ToUint32(isolate, fun)); |
Yang
2016/08/01 09:11:46
I think having the integer conversion in the origi
jgruber
2016/08/01 12:04:23
Done.
| |
67 SET_CALLSITE_PROPERTY(obj, call_site_wasm_func_index_symbol, fun); | 67 SET_CALLSITE_PROPERTY(obj, call_site_wasm_func_index_symbol, fun_index); |
68 } else { | 68 } else { |
69 DCHECK(fun->IsJSFunction()); | 69 DCHECK(fun->IsJSFunction()); |
70 SET_CALLSITE_PROPERTY(obj, call_site_receiver_symbol, receiver); | 70 SET_CALLSITE_PROPERTY(obj, call_site_receiver_symbol, receiver); |
71 SET_CALLSITE_PROPERTY(obj, call_site_function_symbol, fun); | 71 SET_CALLSITE_PROPERTY(obj, call_site_function_symbol, fun); |
72 } | 72 } |
73 | 73 |
74 Handle<Object> pos_int32; | 74 Handle<Object> pos_int32; |
75 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, pos_int32, | 75 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, pos_int32, |
76 Object::ToInt32(isolate, pos)); | 76 Object::ToInt32(isolate, pos)); |
Yang
2016/08/01 09:11:46
Same here. Let's assert that this is a smi.
jgruber
2016/08/01 12:04:23
Done.
| |
77 SET_CALLSITE_PROPERTY(obj, call_site_position_symbol, pos_int32); | 77 SET_CALLSITE_PROPERTY(obj, call_site_position_symbol, pos_int32); |
78 SET_CALLSITE_PROPERTY( | 78 SET_CALLSITE_PROPERTY( |
79 obj, call_site_strict_symbol, | 79 obj, call_site_strict_symbol, |
80 isolate->factory()->ToBoolean(strict_mode->BooleanValue())); | 80 isolate->factory()->ToBoolean(strict_mode->BooleanValue())); |
81 | 81 |
82 return *obj; | 82 return *obj; |
83 } | 83 } |
84 | 84 |
85 #undef SET_CALLSITE_PROPERTY | 85 #undef SET_CALLSITE_PROPERTY |
86 | 86 |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
605 isolate, AppendFileLocation(isolate, recv, &call_site, &builder)); | 605 isolate, AppendFileLocation(isolate, recv, &call_site, &builder)); |
606 builder.AppendCString(")"); | 606 builder.AppendCString(")"); |
607 | 607 |
608 RETURN_RESULT_OR_FAILURE(isolate, builder.Finish()); | 608 RETURN_RESULT_OR_FAILURE(isolate, builder.Finish()); |
609 } | 609 } |
610 | 610 |
611 #undef CHECK_CALLSITE | 611 #undef CHECK_CALLSITE |
612 | 612 |
613 } // namespace internal | 613 } // namespace internal |
614 } // namespace v8 | 614 } // namespace v8 |
OLD | NEW |