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

Side by Side Diff: src/property.h

Issue 151146: Treat the builtins object like other global objects (with... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 5 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/runtime.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 return true; 253 return true;
254 } 254 }
255 255
256 Object* GetLazyValue() { 256 Object* GetLazyValue() {
257 switch (type()) { 257 switch (type()) {
258 case FIELD: 258 case FIELD:
259 return holder()->FastPropertyAt(GetFieldIndex()); 259 return holder()->FastPropertyAt(GetFieldIndex());
260 case NORMAL: { 260 case NORMAL: {
261 Object* value; 261 Object* value;
262 value = holder()->property_dictionary()->ValueAt(GetDictionaryEntry()); 262 value = holder()->property_dictionary()->ValueAt(GetDictionaryEntry());
263 if (holder()->IsJSGlobalObject()) { 263 if (holder()->IsGlobalObject()) {
264 value = JSGlobalPropertyCell::cast(value)->value(); 264 value = JSGlobalPropertyCell::cast(value)->value();
265 } 265 }
266 return value; 266 return value;
267 } 267 }
268 case CONSTANT_FUNCTION: 268 case CONSTANT_FUNCTION:
269 return GetConstantFunction(); 269 return GetConstantFunction();
270 default: 270 default:
271 return Smi::FromInt(0); 271 return Smi::FromInt(0);
272 } 272 }
273 } 273 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 406
407 // Append a descriptor to this stream. 407 // Append a descriptor to this stream.
408 void Write(Descriptor* desc); 408 void Write(Descriptor* desc);
409 // Read a descriptor from the reader and append it to this stream. 409 // Read a descriptor from the reader and append it to this stream.
410 void WriteFrom(DescriptorReader* reader); 410 void WriteFrom(DescriptorReader* reader);
411 }; 411 };
412 412
413 } } // namespace v8::internal 413 } } // namespace v8::internal
414 414
415 #endif // V8_PROPERTY_H_ 415 #endif // V8_PROPERTY_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698