| OLD | NEW |
| 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 25 matching lines...) Expand all Loading... |
| 36 #include "scanner.h" | 36 #include "scanner.h" |
| 37 #include "scopeinfo.h" | 37 #include "scopeinfo.h" |
| 38 #include "string-stream.h" | 38 #include "string-stream.h" |
| 39 | 39 |
| 40 #ifdef ENABLE_DISASSEMBLER | 40 #ifdef ENABLE_DISASSEMBLER |
| 41 #include "disassembler.h" | 41 #include "disassembler.h" |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 namespace v8 { namespace internal { | 44 namespace v8 { namespace internal { |
| 45 | 45 |
| 46 #ifdef DEBUG | |
| 47 DEFINE_bool(trace_normalization, | |
| 48 false, | |
| 49 "prints when objects are turned into dictionaries."); | |
| 50 #endif | |
| 51 | |
| 52 // Getters and setters are stored in a fixed array property. These are | 46 // Getters and setters are stored in a fixed array property. These are |
| 53 // constants for their indices. | 47 // constants for their indices. |
| 54 const int kGetterIndex = 0; | 48 const int kGetterIndex = 0; |
| 55 const int kSetterIndex = 1; | 49 const int kSetterIndex = 1; |
| 56 | 50 |
| 57 bool Object::IsInstanceOf(FunctionTemplateInfo* expected) { | 51 bool Object::IsInstanceOf(FunctionTemplateInfo* expected) { |
| 58 // There is a constraint on the object; check | 52 // There is a constraint on the object; check |
| 59 if (!this->IsJSObject()) return false; | 53 if (!this->IsJSObject()) return false; |
| 60 // Fetch the constructor function of the object | 54 // Fetch the constructor function of the object |
| 61 Object* cons_obj = JSObject::cast(this)->map()->constructor(); | 55 Object* cons_obj = JSObject::cast(this)->map()->constructor(); |
| (...skipping 6199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6261 // No break point. | 6255 // No break point. |
| 6262 if (break_point_objects()->IsUndefined()) return 0; | 6256 if (break_point_objects()->IsUndefined()) return 0; |
| 6263 // Single beak point. | 6257 // Single beak point. |
| 6264 if (!break_point_objects()->IsFixedArray()) return 1; | 6258 if (!break_point_objects()->IsFixedArray()) return 1; |
| 6265 // Multiple break points. | 6259 // Multiple break points. |
| 6266 return FixedArray::cast(break_point_objects())->length(); | 6260 return FixedArray::cast(break_point_objects())->length(); |
| 6267 } | 6261 } |
| 6268 | 6262 |
| 6269 | 6263 |
| 6270 } } // namespace v8::internal | 6264 } } // namespace v8::internal |
| OLD | NEW |