Browse Source

Update upb amalgamation.

Chris Fallin 10 years ago
parent
commit
97b663a8be
2 changed files with 673 additions and 341 deletions
  1. 655 334
      ruby/ext/google/protobuf_c/upb.c
  2. 18 7
      ruby/ext/google/protobuf_c/upb.h

File diff suppressed because it is too large
+ 655 - 334
ruby/ext/google/protobuf_c/upb.c


+ 18 - 7
ruby/ext/google/protobuf_c/upb.h

@@ -6662,7 +6662,9 @@ typedef enum {
                            //   | unused (24)         | opc |
                            //   | unused (24)         | opc |
                            //   | upb_inttable* (32 or 64)  |
                            //   | upb_inttable* (32 or 64)  |
 
 
-  OP_HALT           = 36,  // No arg.
+  OP_DISPATCH       = 36,  // No arg.
+
+  OP_HALT           = 37,  // No arg.
 } opcode;
 } opcode;
 
 
 #define OP_MAX OP_HALT
 #define OP_MAX OP_HALT
@@ -7339,15 +7341,24 @@ UPB_DEFINE_STRUCT0(upb_json_parser,
   int parser_stack[UPB_JSON_MAX_DEPTH];
   int parser_stack[UPB_JSON_MAX_DEPTH];
   int parser_top;
   int parser_top;
 
 
-  // A pointer to the beginning of whatever text we are currently parsing.
-  const char *text_begin;
+  // The handle for the current buffer.
+  const upb_bufhandle *handle;
 
 
-  // We have to accumulate text for member names, integers, unicode escapes, and
-  // base64 partial results.
+  // Accumulate buffer.  See details in parser.rl.
   const char *accumulated;
   const char *accumulated;
   size_t accumulated_len;
   size_t accumulated_len;
-  // TODO: add members and code for allocating a buffer when necessary (when the
-  // member spans input buffers or contains escapes).
+  char *accumulate_buf;
+  size_t accumulate_buf_size;
+
+  // Multi-part text data.  See details in parser.rl.
+  int multipart_state;
+  upb_selector_t string_selector;
+
+  // Input capture.  See details in parser.rl.
+  const char *capture;
+
+  // Intermediate result of parsing a unicode escape sequence.
+  uint32_t digit;
 ));
 ));
 
 
 UPB_BEGIN_EXTERN_C
 UPB_BEGIN_EXTERN_C

Some files were not shown because too many files changed in this diff