| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 OBJECT_TEMPLATE = 1 | 46 OBJECT_TEMPLATE = 1 |
| 47 }; | 47 }; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 | 50 |
| 51 // Utilities for working with neander-objects, primitive | 51 // Utilities for working with neander-objects, primitive |
| 52 // env-independent JSObjects used by the api. | 52 // env-independent JSObjects used by the api. |
| 53 class NeanderObject { | 53 class NeanderObject { |
| 54 public: | 54 public: |
| 55 explicit NeanderObject(int size); | 55 explicit NeanderObject(int size); |
| 56 inline NeanderObject(v8::internal::Handle<v8::internal::Object> obj); | 56 explicit inline NeanderObject(v8::internal::Handle<v8::internal::Object> obj); |
| 57 inline NeanderObject(v8::internal::Object* obj); | 57 explicit inline NeanderObject(v8::internal::Object* obj); |
| 58 inline v8::internal::Object* get(int index); | 58 inline v8::internal::Object* get(int index); |
| 59 inline void set(int index, v8::internal::Object* value); | 59 inline void set(int index, v8::internal::Object* value); |
| 60 inline v8::internal::Handle<v8::internal::JSObject> value() { return value_; } | 60 inline v8::internal::Handle<v8::internal::JSObject> value() { return value_; } |
| 61 int size(); | 61 int size(); |
| 62 private: | 62 private: |
| 63 v8::internal::Handle<v8::internal::JSObject> value_; | 63 v8::internal::Handle<v8::internal::JSObject> value_; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 | 66 |
| 67 // Utilities for working with neander-arrays, a simple extensible | 67 // Utilities for working with neander-arrays, a simple extensible |
| 68 // array abstraction built on neander-objects. | 68 // array abstraction built on neander-objects. |
| 69 class NeanderArray { | 69 class NeanderArray { |
| 70 public: | 70 public: |
| 71 NeanderArray(); | 71 NeanderArray(); |
| 72 inline NeanderArray(v8::internal::Handle<v8::internal::Object> obj); | 72 explicit inline NeanderArray(v8::internal::Handle<v8::internal::Object> obj); |
| 73 inline v8::internal::Handle<v8::internal::JSObject> value() { | 73 inline v8::internal::Handle<v8::internal::JSObject> value() { |
| 74 return obj_.value(); | 74 return obj_.value(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void add(v8::internal::Handle<v8::internal::Object> value); | 77 void add(v8::internal::Handle<v8::internal::Object> value); |
| 78 | 78 |
| 79 int length(); | 79 int length(); |
| 80 | 80 |
| 81 v8::internal::Object* get(int index); | 81 v8::internal::Object* get(int index); |
| 82 // Change the value at an index to undefined value. If the index is | 82 // Change the value at an index to undefined value. If the index is |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 stress_type_ = stress_type; | 563 stress_type_ = stress_type; |
| 564 } | 564 } |
| 565 | 565 |
| 566 private: | 566 private: |
| 567 static v8::Testing::StressType stress_type_; | 567 static v8::Testing::StressType stress_type_; |
| 568 }; | 568 }; |
| 569 | 569 |
| 570 } } // namespace v8::internal | 570 } } // namespace v8::internal |
| 571 | 571 |
| 572 #endif // V8_API_H_ | 572 #endif // V8_API_H_ |
| OLD | NEW |