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

Side by Side Diff: src/factory.cc

Issue 1960663002: Convert primitive receivers for API property callbacks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 7 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 NewStruct(ALIASED_ARGUMENTS_ENTRY_TYPE)); 859 NewStruct(ALIASED_ARGUMENTS_ENTRY_TYPE));
860 entry->set_aliased_context_slot(aliased_context_slot); 860 entry->set_aliased_context_slot(aliased_context_slot);
861 return entry; 861 return entry;
862 } 862 }
863 863
864 864
865 Handle<AccessorInfo> Factory::NewAccessorInfo() { 865 Handle<AccessorInfo> Factory::NewAccessorInfo() {
866 Handle<AccessorInfo> info = 866 Handle<AccessorInfo> info =
867 Handle<AccessorInfo>::cast(NewStruct(ACCESSOR_INFO_TYPE)); 867 Handle<AccessorInfo>::cast(NewStruct(ACCESSOR_INFO_TYPE));
868 info->set_flag(0); // Must clear the flag, it was initialized as undefined. 868 info->set_flag(0); // Must clear the flag, it was initialized as undefined.
869 info->set_is_sloppy(true);
869 return info; 870 return info;
870 } 871 }
871 872
872 873
873 Handle<Script> Factory::NewScript(Handle<String> source) { 874 Handle<Script> Factory::NewScript(Handle<String> source) {
874 // Create and initialize script object. 875 // Create and initialize script object.
875 Heap* heap = isolate()->heap(); 876 Heap* heap = isolate()->heap();
876 Handle<Script> script = Handle<Script>::cast(NewStruct(SCRIPT_TYPE)); 877 Handle<Script> script = Handle<Script>::cast(NewStruct(SCRIPT_TYPE));
877 script->set_source(*source); 878 script->set_source(*source);
878 script->set_name(heap->undefined_value()); 879 script->set_name(heap->undefined_value());
(...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after
2371 } 2372 }
2372 2373
2373 2374
2374 Handle<Object> Factory::ToBoolean(bool value) { 2375 Handle<Object> Factory::ToBoolean(bool value) {
2375 return value ? true_value() : false_value(); 2376 return value ? true_value() : false_value();
2376 } 2377 }
2377 2378
2378 2379
2379 } // namespace internal 2380 } // namespace internal
2380 } // namespace v8 2381 } // namespace v8
OLDNEW
« src/accessors.cc ('K') | « src/code-stubs.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698