Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: src/api.h

Issue 6820028: Mark single-argument inline constructors as 'explicit'. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/v8.h ('k') | src/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698