Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/objects.cc

Issue 1272763005: [stubs] Store typeof string on Oddballs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <iomanip> 5 #include <iomanip>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 10180 matching lines...) Expand 10 before | Expand all | Expand 10 after
10191 10191
10192 Handle<String> JSFunction::GetDebugName(Handle<JSFunction> function) { 10192 Handle<String> JSFunction::GetDebugName(Handle<JSFunction> function) {
10193 Isolate* isolate = function->GetIsolate(); 10193 Isolate* isolate = function->GetIsolate();
10194 Handle<Object> name = 10194 Handle<Object> name =
10195 JSReceiver::GetDataProperty(function, isolate->factory()->name_string()); 10195 JSReceiver::GetDataProperty(function, isolate->factory()->name_string());
10196 if (name->IsString()) return Handle<String>::cast(name); 10196 if (name->IsString()) return Handle<String>::cast(name);
10197 return handle(function->shared()->DebugName(), isolate); 10197 return handle(function->shared()->DebugName(), isolate);
10198 } 10198 }
10199 10199
10200 10200
10201 void Oddball::Initialize(Isolate* isolate, 10201 void Oddball::Initialize(Isolate* isolate, Handle<Oddball> oddball,
10202 Handle<Oddball> oddball, 10202 const char* to_string, Handle<Object> to_number,
10203 const char* to_string, 10203 const char* type_of, byte kind) {
10204 Handle<Object> to_number,
10205 byte kind) {
10206 Handle<String> internalized_to_string = 10204 Handle<String> internalized_to_string =
10207 isolate->factory()->InternalizeUtf8String(to_string); 10205 isolate->factory()->InternalizeUtf8String(to_string);
10206 Handle<String> internalized_type_of =
10207 isolate->factory()->InternalizeUtf8String(type_of);
10208 oddball->set_to_number(*to_number);
10208 oddball->set_to_string(*internalized_to_string); 10209 oddball->set_to_string(*internalized_to_string);
10209 oddball->set_to_number(*to_number); 10210 oddball->set_type_of(*internalized_type_of);
10210 oddball->set_kind(kind); 10211 oddball->set_kind(kind);
10211 } 10212 }
10212 10213
10213 10214
10214 void Script::InitLineEnds(Handle<Script> script) { 10215 void Script::InitLineEnds(Handle<Script> script) {
10215 if (!script->line_ends()->IsUndefined()) return; 10216 if (!script->line_ends()->IsUndefined()) return;
10216 10217
10217 Isolate* isolate = script->GetIsolate(); 10218 Isolate* isolate = script->GetIsolate();
10218 10219
10219 if (!script->source()->IsString()) { 10220 if (!script->source()->IsString()) {
(...skipping 5659 matching lines...) Expand 10 before | Expand all | Expand 10 after
15879 if (cell->value() != *new_value) { 15880 if (cell->value() != *new_value) {
15880 cell->set_value(*new_value); 15881 cell->set_value(*new_value);
15881 Isolate* isolate = cell->GetIsolate(); 15882 Isolate* isolate = cell->GetIsolate();
15882 cell->dependent_code()->DeoptimizeDependentCodeGroup( 15883 cell->dependent_code()->DeoptimizeDependentCodeGroup(
15883 isolate, DependentCode::kPropertyCellChangedGroup); 15884 isolate, DependentCode::kPropertyCellChangedGroup);
15884 } 15885 }
15885 } 15886 }
15886 15887
15887 } // namespace internal 15888 } // namespace internal
15888 } // namespace v8 15889 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698