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

Side by Side Diff: src/objects.cc

Issue 2151163002: [stubs] Improve code generation for ToBoolean. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Fix redness. Created 4 years, 5 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 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 12608 matching lines...) Expand 10 before | Expand all | Expand 10 after
12619 } else if (!shared_info->is_anonymous_expression()) { 12619 } else if (!shared_info->is_anonymous_expression()) {
12620 builder.AppendString(handle(String::cast(shared_info->name()), isolate)); 12620 builder.AppendString(handle(String::cast(shared_info->name()), isolate));
12621 } 12621 }
12622 } 12622 }
12623 builder.AppendString(Handle<String>::cast(shared_info->GetSourceCode())); 12623 builder.AppendString(Handle<String>::cast(shared_info->GetSourceCode()));
12624 return builder.Finish().ToHandleChecked(); 12624 return builder.Finish().ToHandleChecked();
12625 } 12625 }
12626 12626
12627 void Oddball::Initialize(Isolate* isolate, Handle<Oddball> oddball, 12627 void Oddball::Initialize(Isolate* isolate, Handle<Oddball> oddball,
12628 const char* to_string, Handle<Object> to_number, 12628 const char* to_string, Handle<Object> to_number,
12629 bool to_boolean, const char* type_of, byte kind) { 12629 const char* type_of, byte kind) {
12630 Handle<String> internalized_to_string = 12630 Handle<String> internalized_to_string =
12631 isolate->factory()->InternalizeUtf8String(to_string); 12631 isolate->factory()->InternalizeUtf8String(to_string);
12632 Handle<String> internalized_type_of = 12632 Handle<String> internalized_type_of =
12633 isolate->factory()->InternalizeUtf8String(type_of); 12633 isolate->factory()->InternalizeUtf8String(type_of);
12634 oddball->set_to_number_raw(to_number->Number()); 12634 oddball->set_to_number_raw(to_number->Number());
12635 oddball->set_to_boolean(isolate->heap()->ToBoolean(to_boolean));
12636 oddball->set_to_number(*to_number); 12635 oddball->set_to_number(*to_number);
12637 oddball->set_to_string(*internalized_to_string); 12636 oddball->set_to_string(*internalized_to_string);
12638 oddball->set_type_of(*internalized_type_of); 12637 oddball->set_type_of(*internalized_type_of);
12639 oddball->set_kind(kind); 12638 oddball->set_kind(kind);
12640 } 12639 }
12641 12640
12642 void Script::SetEvalOrigin(Handle<Script> script, 12641 void Script::SetEvalOrigin(Handle<Script> script,
12643 Handle<SharedFunctionInfo> outer_info, 12642 Handle<SharedFunctionInfo> outer_info,
12644 int eval_position) { 12643 int eval_position) {
12645 if (eval_position == kNoSourcePosition) { 12644 if (eval_position == kNoSourcePosition) {
(...skipping 6280 matching lines...) Expand 10 before | Expand all | Expand 10 after
18926 18925
18927 Object* data_obj = 18926 Object* data_obj =
18928 constructor->shared()->get_api_func_data()->access_check_info(); 18927 constructor->shared()->get_api_func_data()->access_check_info();
18929 if (data_obj->IsUndefined(isolate)) return nullptr; 18928 if (data_obj->IsUndefined(isolate)) return nullptr;
18930 18929
18931 return AccessCheckInfo::cast(data_obj); 18930 return AccessCheckInfo::cast(data_obj);
18932 } 18931 }
18933 18932
18934 } // namespace internal 18933 } // namespace internal
18935 } // namespace v8 18934 } // 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