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

Side by Side Diff: src/factory.cc

Issue 6932068: A first skeleton for introducing Harmony proxies (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Addressed Kevin's comments. Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | src/heap.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArray> elements, 825 Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArray> elements,
826 PretenureFlag pretenure) { 826 PretenureFlag pretenure) {
827 Handle<JSArray> result = 827 Handle<JSArray> result =
828 Handle<JSArray>::cast(NewJSObject(isolate()->array_function(), 828 Handle<JSArray>::cast(NewJSObject(isolate()->array_function(),
829 pretenure)); 829 pretenure));
830 result->SetContent(*elements); 830 result->SetContent(*elements);
831 return result; 831 return result;
832 } 832 }
833 833
834 834
835 Handle<JSProxy> Factory::NewJSProxy(Handle<Object> handler,
836 Handle<Object> prototype) {
837 CALL_HEAP_FUNCTION(
838 isolate(),
839 isolate()->heap()->AllocateJSProxy(*handler, *prototype),
840 JSProxy);
841 }
842
843
835 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo( 844 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(
836 Handle<String> name, 845 Handle<String> name,
837 int number_of_literals, 846 int number_of_literals,
838 Handle<Code> code, 847 Handle<Code> code,
839 Handle<SerializedScopeInfo> scope_info) { 848 Handle<SerializedScopeInfo> scope_info) {
840 Handle<SharedFunctionInfo> shared = NewSharedFunctionInfo(name); 849 Handle<SharedFunctionInfo> shared = NewSharedFunctionInfo(name);
841 shared->set_code(*code); 850 shared->set_code(*code);
842 shared->set_scope_info(*scope_info); 851 shared->set_scope_info(*scope_info);
843 int literals_array_size = number_of_literals; 852 int literals_array_size = number_of_literals;
844 // If the function contains object, regexp or array literals, 853 // If the function contains object, regexp or array literals,
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 Execution::ConfigureInstance(instance, 1194 Execution::ConfigureInstance(instance,
1186 instance_template, 1195 instance_template,
1187 pending_exception); 1196 pending_exception);
1188 } else { 1197 } else {
1189 *pending_exception = false; 1198 *pending_exception = false;
1190 } 1199 }
1191 } 1200 }
1192 1201
1193 1202
1194 } } // namespace v8::internal 1203 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698