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 #include "src/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 13378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13389 if (shared_info->name_should_print_as_anonymous()) { | 13389 if (shared_info->name_should_print_as_anonymous()) { |
13390 builder.AppendCString("anonymous"); | 13390 builder.AppendCString("anonymous"); |
13391 } else if (!shared_info->is_anonymous_expression()) { | 13391 } else if (!shared_info->is_anonymous_expression()) { |
13392 builder.AppendString(handle(String::cast(shared_info->name()), isolate)); | 13392 builder.AppendString(handle(String::cast(shared_info->name()), isolate)); |
13393 } | 13393 } |
13394 } | 13394 } |
13395 builder.AppendString(Handle<String>::cast(shared_info->GetSourceCode())); | 13395 builder.AppendString(Handle<String>::cast(shared_info->GetSourceCode())); |
13396 return builder.Finish().ToHandleChecked(); | 13396 return builder.Finish().ToHandleChecked(); |
13397 } | 13397 } |
13398 | 13398 |
13399 | |
13400 void Oddball::Initialize(Isolate* isolate, Handle<Oddball> oddball, | 13399 void Oddball::Initialize(Isolate* isolate, Handle<Oddball> oddball, |
13401 const char* to_string, Handle<Object> to_number, | 13400 const char* to_string, Handle<Object> to_number, |
13402 const char* type_of, byte kind) { | 13401 bool to_boolean, const char* type_of, byte kind) { |
13403 Handle<String> internalized_to_string = | 13402 Handle<String> internalized_to_string = |
13404 isolate->factory()->InternalizeUtf8String(to_string); | 13403 isolate->factory()->InternalizeUtf8String(to_string); |
13405 Handle<String> internalized_type_of = | 13404 Handle<String> internalized_type_of = |
13406 isolate->factory()->InternalizeUtf8String(type_of); | 13405 isolate->factory()->InternalizeUtf8String(type_of); |
| 13406 oddball->set_to_boolean(isolate->heap()->ToBoolean(to_boolean)); |
13407 oddball->set_to_number(*to_number); | 13407 oddball->set_to_number(*to_number); |
13408 oddball->set_to_string(*internalized_to_string); | 13408 oddball->set_to_string(*internalized_to_string); |
13409 oddball->set_type_of(*internalized_type_of); | 13409 oddball->set_type_of(*internalized_type_of); |
13410 oddball->set_kind(kind); | 13410 oddball->set_kind(kind); |
13411 } | 13411 } |
13412 | 13412 |
13413 | 13413 |
13414 void Script::InitLineEnds(Handle<Script> script) { | 13414 void Script::InitLineEnds(Handle<Script> script) { |
13415 if (!script->line_ends()->IsUndefined()) return; | 13415 if (!script->line_ends()->IsUndefined()) return; |
13416 | 13416 |
(...skipping 6461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19878 if (cell->value() != *new_value) { | 19878 if (cell->value() != *new_value) { |
19879 cell->set_value(*new_value); | 19879 cell->set_value(*new_value); |
19880 Isolate* isolate = cell->GetIsolate(); | 19880 Isolate* isolate = cell->GetIsolate(); |
19881 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19881 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
19882 isolate, DependentCode::kPropertyCellChangedGroup); | 19882 isolate, DependentCode::kPropertyCellChangedGroup); |
19883 } | 19883 } |
19884 } | 19884 } |
19885 | 19885 |
19886 } // namespace internal | 19886 } // namespace internal |
19887 } // namespace v8 | 19887 } // namespace v8 |
OLD | NEW |