Revision: 24401
Author: [email protected]
Date: Sat Oct 4 10:30:24 2014 UTC
Log: Extend snapshot creation to generate 4-byte values
[email protected], [email protected]
Review URL: https://codereview.chromium.org/623993002
Patch from Andre Baixo <[email protected]>.
https://code.google.com/p/v8/source/detail?r=24401
Modified:
/branches/bleeding_edge/tools/js2c.py
=======================================
--- /branches/bleeding_edge/tools/js2c.py Wed Aug 6 11:39:39 2014 UTC
+++ /branches/bleeding_edge/tools/js2c.py Sat Oct 4 10:30:24 2014 UTC
@@ -498,9 +498,16 @@
def PutInt(blob_file, value):
- assert(value >= 0 and value < (1 << 20))
- size = 1 if (value < 1 << 6) else (2 if (value < 1 << 14) else 3)
- value_with_length = (value << 2) | size
+ assert(value >= 0 and value < (1 << 28))
+ if (value < 1 << 6):
+ size = 1
+ elif (value < 1 << 14):
+ size = 2
+ elif (value < 1 << 22):
+ size = 3
+ else:
+ size = 4
+ value_with_length = (value << 2) | (size - 1)
byte_sequence = bytearray()
for i in xrange(size):
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.