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

Side by Side Diff: src/objects-inl.h

Issue 7056041: Reapply: "Make instanceof and Object.getPrototypeOf work for proxies, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix for Runtime_GetPrototype Created 9 years, 6 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/objects.cc ('k') | src/proxy.js » ('j') | src/runtime.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2943 matching lines...) Expand 10 before | Expand all | Expand 10 after
2954 FromAddress(Memory::Address_at(location_of_address) - Code::kHeaderSize); 2954 FromAddress(Memory::Address_at(location_of_address) - Code::kHeaderSize);
2955 } 2955 }
2956 2956
2957 2957
2958 Object* Map::prototype() { 2958 Object* Map::prototype() {
2959 return READ_FIELD(this, kPrototypeOffset); 2959 return READ_FIELD(this, kPrototypeOffset);
2960 } 2960 }
2961 2961
2962 2962
2963 void Map::set_prototype(Object* value, WriteBarrierMode mode) { 2963 void Map::set_prototype(Object* value, WriteBarrierMode mode) {
2964 ASSERT(value->IsNull() || value->IsJSObject()); 2964 ASSERT(value->IsNull() || value->IsJSReceiver());
2965 WRITE_FIELD(this, kPrototypeOffset, value); 2965 WRITE_FIELD(this, kPrototypeOffset, value);
2966 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kPrototypeOffset, mode); 2966 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kPrototypeOffset, mode);
2967 } 2967 }
2968 2968
2969 2969
2970 MaybeObject* Map::GetFastElementsMap() { 2970 MaybeObject* Map::GetFastElementsMap() {
2971 if (has_fast_elements()) return this; 2971 if (has_fast_elements()) return this;
2972 Object* obj; 2972 Object* obj;
2973 { MaybeObject* maybe_obj = CopyDropTransitions(); 2973 { MaybeObject* maybe_obj = CopyDropTransitions();
2974 if (!maybe_obj->ToObject(&obj)) return maybe_obj; 2974 if (!maybe_obj->ToObject(&obj)) return maybe_obj;
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
4298 #undef WRITE_INT_FIELD 4298 #undef WRITE_INT_FIELD
4299 #undef READ_SHORT_FIELD 4299 #undef READ_SHORT_FIELD
4300 #undef WRITE_SHORT_FIELD 4300 #undef WRITE_SHORT_FIELD
4301 #undef READ_BYTE_FIELD 4301 #undef READ_BYTE_FIELD
4302 #undef WRITE_BYTE_FIELD 4302 #undef WRITE_BYTE_FIELD
4303 4303
4304 4304
4305 } } // namespace v8::internal 4305 } } // namespace v8::internal
4306 4306
4307 #endif // V8_OBJECTS_INL_H_ 4307 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/proxy.js » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698