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

Side by Side Diff: src/runtime.cc

Issue 450303003: Tag all prototypes as proto, except those set using __proto__ (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove is_shared from Map Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/runtime.h ('k') | src/serialize.cc » ('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 // 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 <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
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 1844 matching lines...) Expand 10 before | Expand all | Expand 10 after
1855 while (!iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN)) { 1855 while (!iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN)) {
1856 if (PrototypeIterator::GetCurrent(iter)->IsJSProxy()) { 1856 if (PrototypeIterator::GetCurrent(iter)->IsJSProxy()) {
1857 return PrototypeIterator::GetCurrent(iter); 1857 return PrototypeIterator::GetCurrent(iter);
1858 } 1858 }
1859 iter.Advance(); 1859 iter.Advance();
1860 } 1860 }
1861 return PrototypeIterator::GetCurrent(iter); 1861 return PrototypeIterator::GetCurrent(iter);
1862 } 1862 }
1863 1863
1864 1864
1865 RUNTIME_FUNCTION(Runtime_InternalSetPrototype) {
1866 HandleScope scope(isolate);
1867 DCHECK(args.length() == 2);
1868 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
1869 CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1);
1870 DCHECK(!obj->IsAccessCheckNeeded());
1871 DCHECK(!obj->map()->is_observed());
1872 Handle<Object> result;
1873 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
1874 isolate, result, JSObject::SetPrototype(obj, prototype, false));
1875 return *result;
1876 }
1877
1878
1865 RUNTIME_FUNCTION(Runtime_SetPrototype) { 1879 RUNTIME_FUNCTION(Runtime_SetPrototype) {
1866 HandleScope scope(isolate); 1880 HandleScope scope(isolate);
1867 DCHECK(args.length() == 2); 1881 DCHECK(args.length() == 2);
1868 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); 1882 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
1869 CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1); 1883 CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1);
1870 if (obj->IsAccessCheckNeeded() && 1884 if (obj->IsAccessCheckNeeded() &&
1871 !isolate->MayNamedAccess( 1885 !isolate->MayNamedAccess(
1872 obj, isolate->factory()->proto_string(), v8::ACCESS_SET)) { 1886 obj, isolate->factory()->proto_string(), v8::ACCESS_SET)) {
1873 isolate->ReportFailedAccessCheck(obj, v8::ACCESS_SET); 1887 isolate->ReportFailedAccessCheck(obj, v8::ACCESS_SET);
1874 RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate); 1888 RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate);
(...skipping 13730 matching lines...) Expand 10 before | Expand all | Expand 10 after
15605 } 15619 }
15606 return NULL; 15620 return NULL;
15607 } 15621 }
15608 15622
15609 15623
15610 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15624 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15611 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15625 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15612 } 15626 }
15613 15627
15614 } } // namespace v8::internal 15628 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698