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

Side by Side Diff: src/objects.h

Issue 7889046: Add an optional source length field to the Extension constructor. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 3 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 6462 matching lines...) Expand 10 before | Expand all | Expand 10 after
6473 6473
6474 // The ExternalAsciiString class is an external string backed by an 6474 // The ExternalAsciiString class is an external string backed by an
6475 // ASCII string. 6475 // ASCII string.
6476 class ExternalAsciiString: public ExternalString { 6476 class ExternalAsciiString: public ExternalString {
6477 public: 6477 public:
6478 static const bool kHasAsciiEncoding = true; 6478 static const bool kHasAsciiEncoding = true;
6479 6479
6480 typedef v8::String::ExternalAsciiStringResource Resource; 6480 typedef v8::String::ExternalAsciiStringResource Resource;
6481 6481
6482 // The underlying resource. 6482 // The underlying resource.
6483 inline Resource* resource(); 6483 inline const Resource* resource();
6484 inline void set_resource(Resource* buffer); 6484 inline void set_resource(const Resource* buffer);
6485 6485
6486 // Dispatched behavior. 6486 // Dispatched behavior.
6487 uint16_t ExternalAsciiStringGet(int index); 6487 uint16_t ExternalAsciiStringGet(int index);
6488 6488
6489 // Casting. 6489 // Casting.
6490 static inline ExternalAsciiString* cast(Object* obj); 6490 static inline ExternalAsciiString* cast(Object* obj);
6491 6491
6492 // Garbage collection support. 6492 // Garbage collection support.
6493 inline void ExternalAsciiStringIterateBody(ObjectVisitor* v); 6493 inline void ExternalAsciiStringIterateBody(ObjectVisitor* v);
6494 6494
(...skipping 15 matching lines...) Expand all
6510 6510
6511 // The ExternalTwoByteString class is an external string backed by a UTF-16 6511 // The ExternalTwoByteString class is an external string backed by a UTF-16
6512 // encoded string. 6512 // encoded string.
6513 class ExternalTwoByteString: public ExternalString { 6513 class ExternalTwoByteString: public ExternalString {
6514 public: 6514 public:
6515 static const bool kHasAsciiEncoding = false; 6515 static const bool kHasAsciiEncoding = false;
6516 6516
6517 typedef v8::String::ExternalStringResource Resource; 6517 typedef v8::String::ExternalStringResource Resource;
6518 6518
6519 // The underlying string resource. 6519 // The underlying string resource.
6520 inline Resource* resource(); 6520 inline const Resource* resource();
6521 inline void set_resource(Resource* buffer); 6521 inline void set_resource(const Resource* buffer);
6522 6522
6523 // Dispatched behavior. 6523 // Dispatched behavior.
6524 uint16_t ExternalTwoByteStringGet(int index); 6524 uint16_t ExternalTwoByteStringGet(int index);
6525 6525
6526 // For regexp code. 6526 // For regexp code.
6527 const uint16_t* ExternalTwoByteStringGetData(unsigned start); 6527 const uint16_t* ExternalTwoByteStringGetData(unsigned start);
6528 6528
6529 // Casting. 6529 // Casting.
6530 static inline ExternalTwoByteString* cast(Object* obj); 6530 static inline ExternalTwoByteString* cast(Object* obj);
6531 6531
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
7486 } else { 7486 } else {
7487 value &= ~(1 << bit_position); 7487 value &= ~(1 << bit_position);
7488 } 7488 }
7489 return value; 7489 return value;
7490 } 7490 }
7491 }; 7491 };
7492 7492
7493 } } // namespace v8::internal 7493 } } // namespace v8::internal
7494 7494
7495 #endif // V8_OBJECTS_H_ 7495 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698