| OLD | NEW |
| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 : isolate_(isolate), | 176 : isolate_(isolate), |
| 177 next_(isolate->top_lookup_result()), | 177 next_(isolate->top_lookup_result()), |
| 178 lookup_type_(NOT_FOUND), | 178 lookup_type_(NOT_FOUND), |
| 179 holder_(NULL), | 179 holder_(NULL), |
| 180 cacheable_(true), | 180 cacheable_(true), |
| 181 details_(NONE, NONEXISTENT) { | 181 details_(NONE, NONEXISTENT) { |
| 182 isolate->SetTopLookupResult(this); | 182 isolate->SetTopLookupResult(this); |
| 183 } | 183 } |
| 184 | 184 |
| 185 ~LookupResult() { | 185 ~LookupResult() { |
| 186 ASSERT(isolate_->top_lookup_result() == this); | 186 ASSERT(isolate()->top_lookup_result() == this); |
| 187 isolate_->SetTopLookupResult(next_); | 187 isolate()->SetTopLookupResult(next_); |
| 188 } | 188 } |
| 189 | 189 |
| 190 Isolate* isolate() const { return isolate_; } |
| 191 |
| 190 void DescriptorResult(JSObject* holder, PropertyDetails details, int number) { | 192 void DescriptorResult(JSObject* holder, PropertyDetails details, int number) { |
| 191 lookup_type_ = DESCRIPTOR_TYPE; | 193 lookup_type_ = DESCRIPTOR_TYPE; |
| 192 holder_ = holder; | 194 holder_ = holder; |
| 193 details_ = details; | 195 details_ = details; |
| 194 number_ = number; | 196 number_ = number; |
| 195 } | 197 } |
| 196 | 198 |
| 197 void TransitionResult(JSObject* holder, int number) { | 199 void TransitionResult(JSObject* holder, int number) { |
| 198 lookup_type_ = TRANSITION_TYPE; | 200 lookup_type_ = TRANSITION_TYPE; |
| 199 details_ = PropertyDetails(NONE, TRANSITION); | 201 details_ = PropertyDetails(NONE, TRANSITION); |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 } | 337 } |
| 336 return value; | 338 return value; |
| 337 } | 339 } |
| 338 case CONSTANT_FUNCTION: | 340 case CONSTANT_FUNCTION: |
| 339 return GetConstantFunction(); | 341 return GetConstantFunction(); |
| 340 case CALLBACKS: | 342 case CALLBACKS: |
| 341 case HANDLER: | 343 case HANDLER: |
| 342 case INTERCEPTOR: | 344 case INTERCEPTOR: |
| 343 case TRANSITION: | 345 case TRANSITION: |
| 344 case NONEXISTENT: | 346 case NONEXISTENT: |
| 345 return Isolate::Current()->heap()->the_hole_value(); | 347 return isolate()->heap()->the_hole_value(); |
| 346 } | 348 } |
| 347 UNREACHABLE(); | 349 UNREACHABLE(); |
| 348 return NULL; | 350 return NULL; |
| 349 } | 351 } |
| 350 | 352 |
| 351 Map* GetTransitionTarget() { | 353 Map* GetTransitionTarget() { |
| 352 ASSERT(IsTransition()); | 354 ASSERT(IsTransition()); |
| 353 TransitionArray* transitions = holder()->map()->transitions(); | 355 TransitionArray* transitions = holder()->map()->transitions(); |
| 354 return transitions->GetTarget(number_); | 356 return transitions->GetTarget(number_); |
| 355 } | 357 } |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 JSReceiver* holder_; | 461 JSReceiver* holder_; |
| 460 int number_; | 462 int number_; |
| 461 bool cacheable_; | 463 bool cacheable_; |
| 462 PropertyDetails details_; | 464 PropertyDetails details_; |
| 463 }; | 465 }; |
| 464 | 466 |
| 465 | 467 |
| 466 } } // namespace v8::internal | 468 } } // namespace v8::internal |
| 467 | 469 |
| 468 #endif // V8_PROPERTY_H_ | 470 #endif // V8_PROPERTY_H_ |
| OLD | NEW |