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

Side by Side Diff: src/accessors.cc

Issue 3031005: [Isolates] Avoid dereferencing Isolate::Current() to check oddball identities... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 10 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 | « no previous file | src/ast.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 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 21 matching lines...) Expand all
32 #include "factory.h" 32 #include "factory.h"
33 #include "scopeinfo.h" 33 #include "scopeinfo.h"
34 34
35 namespace v8 { 35 namespace v8 {
36 namespace internal { 36 namespace internal {
37 37
38 38
39 template <class C> 39 template <class C>
40 static C* FindInPrototypeChain(Object* obj, bool* found_it) { 40 static C* FindInPrototypeChain(Object* obj, bool* found_it) {
41 ASSERT(!*found_it); 41 ASSERT(!*found_it);
42 Heap* heap = HEAP;
42 while (!Is<C>(obj)) { 43 while (!Is<C>(obj)) {
43 if (obj == HEAP->null_value()) return NULL; 44 if (obj == heap->null_value()) return NULL;
44 obj = obj->GetPrototype(); 45 obj = obj->GetPrototype();
45 } 46 }
46 *found_it = true; 47 *found_it = true;
47 return C::cast(obj); 48 return C::cast(obj);
48 } 49 }
49 50
50 51
51 // Entry point that never should be called. 52 // Entry point that never should be called.
52 Object* Accessors::IllegalSetter(JSObject*, Object*, void*) { 53 Object* Accessors::IllegalSetter(JSObject*, Object*, void*) {
53 UNREACHABLE(); 54 UNREACHABLE();
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 } 653 }
653 654
654 655
655 const AccessorDescriptor Accessors::ObjectPrototype = { 656 const AccessorDescriptor Accessors::ObjectPrototype = {
656 ObjectGetPrototype, 657 ObjectGetPrototype,
657 ObjectSetPrototype, 658 ObjectSetPrototype,
658 0 659 0
659 }; 660 };
660 661
661 } } // namespace v8::internal 662 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698