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

Side by Side Diff: src/factory.cc

Issue 12212011: Make __proto__ a foreign callback on Object.prototype. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added regression test for issue 2441. Created 7 years, 10 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/json-parser.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 932
933 Handle<GlobalObject> Factory::NewGlobalObject( 933 Handle<GlobalObject> Factory::NewGlobalObject(
934 Handle<JSFunction> constructor) { 934 Handle<JSFunction> constructor) {
935 CALL_HEAP_FUNCTION(isolate(), 935 CALL_HEAP_FUNCTION(isolate(),
936 isolate()->heap()->AllocateGlobalObject(*constructor), 936 isolate()->heap()->AllocateGlobalObject(*constructor),
937 GlobalObject); 937 GlobalObject);
938 } 938 }
939 939
940 940
941 941
942 Handle<JSObject> Factory::NewJSObjectFromMap(Handle<Map> map) { 942 Handle<JSObject> Factory::NewJSObjectFromMap(Handle<Map> map,
943 PretenureFlag pretenure) {
943 CALL_HEAP_FUNCTION( 944 CALL_HEAP_FUNCTION(
944 isolate(), 945 isolate(),
945 isolate()->heap()->AllocateJSObjectFromMap(*map, NOT_TENURED), 946 isolate()->heap()->AllocateJSObjectFromMap(*map, pretenure),
946 JSObject); 947 JSObject);
947 } 948 }
948 949
949 950
950 Handle<JSArray> Factory::NewJSArray(int capacity, 951 Handle<JSArray> Factory::NewJSArray(int capacity,
951 ElementsKind elements_kind, 952 ElementsKind elements_kind,
952 PretenureFlag pretenure) { 953 PretenureFlag pretenure) {
953 if (capacity != 0) { 954 if (capacity != 0) {
954 elements_kind = GetHoleyElementsKind(elements_kind); 955 elements_kind = GetHoleyElementsKind(elements_kind);
955 } 956 }
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 1448
1448 1449
1449 Handle<Object> Factory::ToBoolean(bool value) { 1450 Handle<Object> Factory::ToBoolean(bool value) {
1450 return Handle<Object>(value 1451 return Handle<Object>(value
1451 ? isolate()->heap()->true_value() 1452 ? isolate()->heap()->true_value()
1452 : isolate()->heap()->false_value()); 1453 : isolate()->heap()->false_value());
1453 } 1454 }
1454 1455
1455 1456
1456 } } // namespace v8::internal 1457 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/json-parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698