| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_API_H_ | 5 #ifndef V8_API_H_ |
| 6 #define V8_API_H_ | 6 #define V8_API_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "include/v8-testing.h" | 10 #include "include/v8-testing.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // Utilities for working with neander-arrays, a simple extensible | 47 // Utilities for working with neander-arrays, a simple extensible |
| 48 // array abstraction built on neander-objects. | 48 // array abstraction built on neander-objects. |
| 49 class NeanderArray { | 49 class NeanderArray { |
| 50 public: | 50 public: |
| 51 explicit NeanderArray(v8::internal::Isolate* isolate); | 51 explicit NeanderArray(v8::internal::Isolate* isolate); |
| 52 explicit inline NeanderArray(v8::internal::Handle<v8::internal::Object> obj); | 52 explicit inline NeanderArray(v8::internal::Handle<v8::internal::Object> obj); |
| 53 inline v8::internal::Handle<v8::internal::JSObject> value() { | 53 inline v8::internal::Handle<v8::internal::JSObject> value() { |
| 54 return obj_.value(); | 54 return obj_.value(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void add(v8::internal::Handle<v8::internal::Object> value); | 57 void add(internal::Isolate* isolate, |
| 58 v8::internal::Handle<v8::internal::Object> value); |
| 58 | 59 |
| 59 int length(); | 60 int length(); |
| 60 | 61 |
| 61 v8::internal::Object* get(int index); | 62 v8::internal::Object* get(int index); |
| 62 // Change the value at an index to undefined value. If the index is | 63 // Change the value at an index to undefined value. If the index is |
| 63 // out of bounds, the request is ignored. Returns the old value. | 64 // out of bounds, the request is ignored. Returns the old value. |
| 64 void set(int index, v8::internal::Object* value); | 65 void set(int index, v8::internal::Object* value); |
| 65 private: | 66 private: |
| 66 NeanderObject obj_; | 67 NeanderObject obj_; |
| 67 }; | 68 }; |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 stress_type_ = stress_type; | 693 stress_type_ = stress_type; |
| 693 } | 694 } |
| 694 | 695 |
| 695 private: | 696 private: |
| 696 static v8::Testing::StressType stress_type_; | 697 static v8::Testing::StressType stress_type_; |
| 697 }; | 698 }; |
| 698 | 699 |
| 699 } } // namespace v8::internal | 700 } } // namespace v8::internal |
| 700 | 701 |
| 701 #endif // V8_API_H_ | 702 #endif // V8_API_H_ |
| OLD | NEW |