| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 FUNCTION_TEMPLATE = 0, | 49 FUNCTION_TEMPLATE = 0, |
| 50 OBJECT_TEMPLATE = 1 | 50 OBJECT_TEMPLATE = 1 |
| 51 }; | 51 }; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 | 54 |
| 55 // Utilities for working with neander-objects, primitive | 55 // Utilities for working with neander-objects, primitive |
| 56 // env-independent JSObjects used by the api. | 56 // env-independent JSObjects used by the api. |
| 57 class NeanderObject { | 57 class NeanderObject { |
| 58 public: | 58 public: |
| 59 explicit NeanderObject(int size); | 59 explicit NeanderObject(v8::internal::Isolate* isolate, int size); |
| 60 explicit inline NeanderObject(v8::internal::Handle<v8::internal::Object> obj); | 60 explicit inline NeanderObject(v8::internal::Handle<v8::internal::Object> obj); |
| 61 explicit inline NeanderObject(v8::internal::Object* obj); | 61 explicit inline NeanderObject(v8::internal::Object* obj); |
| 62 inline v8::internal::Object* get(int index); | 62 inline v8::internal::Object* get(int index); |
| 63 inline void set(int index, v8::internal::Object* value); | 63 inline void set(int index, v8::internal::Object* value); |
| 64 inline v8::internal::Handle<v8::internal::JSObject> value() { return value_; } | 64 inline v8::internal::Handle<v8::internal::JSObject> value() { return value_; } |
| 65 int size(); | 65 int size(); |
| 66 private: | 66 private: |
| 67 v8::internal::Handle<v8::internal::JSObject> value_; | 67 v8::internal::Handle<v8::internal::JSObject> value_; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 | 70 |
| 71 // Utilities for working with neander-arrays, a simple extensible | 71 // Utilities for working with neander-arrays, a simple extensible |
| 72 // array abstraction built on neander-objects. | 72 // array abstraction built on neander-objects. |
| 73 class NeanderArray { | 73 class NeanderArray { |
| 74 public: | 74 public: |
| 75 NeanderArray(); | 75 explicit NeanderArray(v8::internal::Isolate* isolate); |
| 76 explicit inline NeanderArray(v8::internal::Handle<v8::internal::Object> obj); | 76 explicit inline NeanderArray(v8::internal::Handle<v8::internal::Object> obj); |
| 77 inline v8::internal::Handle<v8::internal::JSObject> value() { | 77 inline v8::internal::Handle<v8::internal::JSObject> value() { |
| 78 return obj_.value(); | 78 return obj_.value(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void add(v8::internal::Handle<v8::internal::Object> value); | 81 void add(v8::internal::Handle<v8::internal::Object> value); |
| 82 | 82 |
| 83 int length(); | 83 int length(); |
| 84 | 84 |
| 85 v8::internal::Object* get(int index); | 85 v8::internal::Object* get(int index); |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 stress_type_ = stress_type; | 707 stress_type_ = stress_type; |
| 708 } | 708 } |
| 709 | 709 |
| 710 private: | 710 private: |
| 711 static v8::Testing::StressType stress_type_; | 711 static v8::Testing::StressType stress_type_; |
| 712 }; | 712 }; |
| 713 | 713 |
| 714 } } // namespace v8::internal | 714 } } // namespace v8::internal |
| 715 | 715 |
| 716 #endif // V8_API_H_ | 716 #endif // V8_API_H_ |
| OLD | NEW |