OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/api.h" | 5 #include "src/api.h" |
6 | 6 |
7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
(...skipping 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1591 // ScriptData takes care of pointer-aligning the data. | 1591 // ScriptData takes care of pointer-aligning the data. |
1592 script_data = new i::ScriptData(source->cached_data->data, | 1592 script_data = new i::ScriptData(source->cached_data->data, |
1593 source->cached_data->length); | 1593 source->cached_data->length); |
1594 } | 1594 } |
1595 | 1595 |
1596 i::Handle<i::String> str = Utils::OpenHandle(*(source->source_string)); | 1596 i::Handle<i::String> str = Utils::OpenHandle(*(source->source_string)); |
1597 LOG_API(isolate, "ScriptCompiler::CompileUnbound"); | 1597 LOG_API(isolate, "ScriptCompiler::CompileUnbound"); |
1598 ENTER_V8(isolate); | 1598 ENTER_V8(isolate); |
1599 i::SharedFunctionInfo* raw_result = NULL; | 1599 i::SharedFunctionInfo* raw_result = NULL; |
1600 { i::HandleScope scope(isolate); | 1600 { i::HandleScope scope(isolate); |
| 1601 i::HistogramTimerScope total(isolate->counters()->compile_script(), true); |
1601 i::Handle<i::Object> name_obj; | 1602 i::Handle<i::Object> name_obj; |
1602 int line_offset = 0; | 1603 int line_offset = 0; |
1603 int column_offset = 0; | 1604 int column_offset = 0; |
1604 bool is_shared_cross_origin = false; | 1605 bool is_shared_cross_origin = false; |
1605 if (!source->resource_name.IsEmpty()) { | 1606 if (!source->resource_name.IsEmpty()) { |
1606 name_obj = Utils::OpenHandle(*(source->resource_name)); | 1607 name_obj = Utils::OpenHandle(*(source->resource_name)); |
1607 } | 1608 } |
1608 if (!source->resource_line_offset.IsEmpty()) { | 1609 if (!source->resource_line_offset.IsEmpty()) { |
1609 line_offset = static_cast<int>(source->resource_line_offset->Value()); | 1610 line_offset = static_cast<int>(source->resource_line_offset->Value()); |
1610 } | 1611 } |
(...skipping 6045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7656 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7657 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7657 Address callback_address = | 7658 Address callback_address = |
7658 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7659 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7659 VMState<EXTERNAL> state(isolate); | 7660 VMState<EXTERNAL> state(isolate); |
7660 ExternalCallbackScope call_scope(isolate, callback_address); | 7661 ExternalCallbackScope call_scope(isolate, callback_address); |
7661 callback(info); | 7662 callback(info); |
7662 } | 7663 } |
7663 | 7664 |
7664 | 7665 |
7665 } } // namespace v8::internal | 7666 } } // namespace v8::internal |
OLD | NEW |